#[derive(Clone, Debug)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum AccountExternalAccountCreated {
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "bank_account"))]
BankAccount(stripe_shared::BankAccount),
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
Card(stripe_shared::Card),
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
Source(stripe_shared::Source),
}
#[derive(Default)]
pub struct AccountExternalAccountCreatedBuilder {
inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}
const _: () = {
use miniserde::de::{Map, Visitor};
use miniserde::json::Value;
use miniserde::{Deserialize, Result, make_place};
use stripe_types::MapBuilder;
use stripe_types::miniserde_helpers::FromValueOpt;
use super::*;
make_place!(Place);
struct Builder<'a> {
out: &'a mut Option<AccountExternalAccountCreated>,
builder: AccountExternalAccountCreatedBuilder,
}
impl Deserialize for AccountExternalAccountCreated {
fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
Place::new(out)
}
}
impl Visitor for Place<AccountExternalAccountCreated> {
fn map(&mut self) -> Result<Box<dyn Map + '_>> {
Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
}
}
impl Map for Builder<'_> {
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.builder.key(k)
}
fn finish(&mut self) -> Result<()> {
*self.out = self.builder.take_out();
Ok(())
}
}
impl MapBuilder for AccountExternalAccountCreatedBuilder {
type Out = AccountExternalAccountCreated;
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.inner.key_inner(k)
}
fn deser_default() -> Self {
Self::default()
}
fn take_out(&mut self) -> Option<Self::Out> {
let (k, o) = self.inner.finish_inner()?;
AccountExternalAccountCreated::construct(&k, o)
}
}
impl stripe_types::ObjectDeser for AccountExternalAccountCreated {
type Builder = AccountExternalAccountCreatedBuilder;
}
impl AccountExternalAccountCreated {
fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
Some(match key {
"bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
"card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
"source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
_ => return None,
})
}
}
impl FromValueOpt for AccountExternalAccountCreated {
fn from_value(v: Value) -> Option<Self> {
let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
Self::construct(&typ, obj)
}
}
};
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum AccountExternalAccountDeleted {
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "bank_account"))]
BankAccount(stripe_shared::BankAccount),
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
Card(stripe_shared::Card),
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
Source(stripe_shared::Source),
}
#[derive(Default)]
pub struct AccountExternalAccountDeletedBuilder {
inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}
const _: () = {
use miniserde::de::{Map, Visitor};
use miniserde::json::Value;
use miniserde::{Deserialize, Result, make_place};
use stripe_types::MapBuilder;
use stripe_types::miniserde_helpers::FromValueOpt;
use super::*;
make_place!(Place);
struct Builder<'a> {
out: &'a mut Option<AccountExternalAccountDeleted>,
builder: AccountExternalAccountDeletedBuilder,
}
impl Deserialize for AccountExternalAccountDeleted {
fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
Place::new(out)
}
}
impl Visitor for Place<AccountExternalAccountDeleted> {
fn map(&mut self) -> Result<Box<dyn Map + '_>> {
Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
}
}
impl Map for Builder<'_> {
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.builder.key(k)
}
fn finish(&mut self) -> Result<()> {
*self.out = self.builder.take_out();
Ok(())
}
}
impl MapBuilder for AccountExternalAccountDeletedBuilder {
type Out = AccountExternalAccountDeleted;
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.inner.key_inner(k)
}
fn deser_default() -> Self {
Self::default()
}
fn take_out(&mut self) -> Option<Self::Out> {
let (k, o) = self.inner.finish_inner()?;
AccountExternalAccountDeleted::construct(&k, o)
}
}
impl stripe_types::ObjectDeser for AccountExternalAccountDeleted {
type Builder = AccountExternalAccountDeletedBuilder;
}
impl AccountExternalAccountDeleted {
fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
Some(match key {
"bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
"card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
"source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
_ => return None,
})
}
}
impl FromValueOpt for AccountExternalAccountDeleted {
fn from_value(v: Value) -> Option<Self> {
let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
Self::construct(&typ, obj)
}
}
};
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum AccountExternalAccountUpdated {
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "bank_account"))]
BankAccount(stripe_shared::BankAccount),
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
Card(stripe_shared::Card),
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
Source(stripe_shared::Source),
}
#[derive(Default)]
pub struct AccountExternalAccountUpdatedBuilder {
inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}
const _: () = {
use miniserde::de::{Map, Visitor};
use miniserde::json::Value;
use miniserde::{Deserialize, Result, make_place};
use stripe_types::MapBuilder;
use stripe_types::miniserde_helpers::FromValueOpt;
use super::*;
make_place!(Place);
struct Builder<'a> {
out: &'a mut Option<AccountExternalAccountUpdated>,
builder: AccountExternalAccountUpdatedBuilder,
}
impl Deserialize for AccountExternalAccountUpdated {
fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
Place::new(out)
}
}
impl Visitor for Place<AccountExternalAccountUpdated> {
fn map(&mut self) -> Result<Box<dyn Map + '_>> {
Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
}
}
impl Map for Builder<'_> {
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.builder.key(k)
}
fn finish(&mut self) -> Result<()> {
*self.out = self.builder.take_out();
Ok(())
}
}
impl MapBuilder for AccountExternalAccountUpdatedBuilder {
type Out = AccountExternalAccountUpdated;
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.inner.key_inner(k)
}
fn deser_default() -> Self {
Self::default()
}
fn take_out(&mut self) -> Option<Self::Out> {
let (k, o) = self.inner.finish_inner()?;
AccountExternalAccountUpdated::construct(&k, o)
}
}
impl stripe_types::ObjectDeser for AccountExternalAccountUpdated {
type Builder = AccountExternalAccountUpdatedBuilder;
}
impl AccountExternalAccountUpdated {
fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
Some(match key {
"bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
"card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
"source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
_ => return None,
})
}
}
impl FromValueOpt for AccountExternalAccountUpdated {
fn from_value(v: Value) -> Option<Self> {
let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
Self::construct(&typ, obj)
}
}
};
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum CustomerSourceCreated {
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "bank_account"))]
BankAccount(stripe_shared::BankAccount),
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
Card(stripe_shared::Card),
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
Source(stripe_shared::Source),
}
#[derive(Default)]
pub struct CustomerSourceCreatedBuilder {
inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}
const _: () = {
use miniserde::de::{Map, Visitor};
use miniserde::json::Value;
use miniserde::{Deserialize, Result, make_place};
use stripe_types::MapBuilder;
use stripe_types::miniserde_helpers::FromValueOpt;
use super::*;
make_place!(Place);
struct Builder<'a> {
out: &'a mut Option<CustomerSourceCreated>,
builder: CustomerSourceCreatedBuilder,
}
impl Deserialize for CustomerSourceCreated {
fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
Place::new(out)
}
}
impl Visitor for Place<CustomerSourceCreated> {
fn map(&mut self) -> Result<Box<dyn Map + '_>> {
Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
}
}
impl Map for Builder<'_> {
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.builder.key(k)
}
fn finish(&mut self) -> Result<()> {
*self.out = self.builder.take_out();
Ok(())
}
}
impl MapBuilder for CustomerSourceCreatedBuilder {
type Out = CustomerSourceCreated;
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.inner.key_inner(k)
}
fn deser_default() -> Self {
Self::default()
}
fn take_out(&mut self) -> Option<Self::Out> {
let (k, o) = self.inner.finish_inner()?;
CustomerSourceCreated::construct(&k, o)
}
}
impl stripe_types::ObjectDeser for CustomerSourceCreated {
type Builder = CustomerSourceCreatedBuilder;
}
impl CustomerSourceCreated {
fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
Some(match key {
"bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
"card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
"source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
_ => return None,
})
}
}
impl FromValueOpt for CustomerSourceCreated {
fn from_value(v: Value) -> Option<Self> {
let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
Self::construct(&typ, obj)
}
}
};
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum CustomerSourceDeleted {
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "bank_account"))]
BankAccount(stripe_shared::BankAccount),
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
Card(stripe_shared::Card),
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
Source(stripe_shared::Source),
}
#[derive(Default)]
pub struct CustomerSourceDeletedBuilder {
inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}
const _: () = {
use miniserde::de::{Map, Visitor};
use miniserde::json::Value;
use miniserde::{Deserialize, Result, make_place};
use stripe_types::MapBuilder;
use stripe_types::miniserde_helpers::FromValueOpt;
use super::*;
make_place!(Place);
struct Builder<'a> {
out: &'a mut Option<CustomerSourceDeleted>,
builder: CustomerSourceDeletedBuilder,
}
impl Deserialize for CustomerSourceDeleted {
fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
Place::new(out)
}
}
impl Visitor for Place<CustomerSourceDeleted> {
fn map(&mut self) -> Result<Box<dyn Map + '_>> {
Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
}
}
impl Map for Builder<'_> {
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.builder.key(k)
}
fn finish(&mut self) -> Result<()> {
*self.out = self.builder.take_out();
Ok(())
}
}
impl MapBuilder for CustomerSourceDeletedBuilder {
type Out = CustomerSourceDeleted;
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.inner.key_inner(k)
}
fn deser_default() -> Self {
Self::default()
}
fn take_out(&mut self) -> Option<Self::Out> {
let (k, o) = self.inner.finish_inner()?;
CustomerSourceDeleted::construct(&k, o)
}
}
impl stripe_types::ObjectDeser for CustomerSourceDeleted {
type Builder = CustomerSourceDeletedBuilder;
}
impl CustomerSourceDeleted {
fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
Some(match key {
"bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
"card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
"source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
_ => return None,
})
}
}
impl FromValueOpt for CustomerSourceDeleted {
fn from_value(v: Value) -> Option<Self> {
let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
Self::construct(&typ, obj)
}
}
};
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum CustomerSourceExpiring {
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
Card(stripe_shared::Card),
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
Source(stripe_shared::Source),
}
#[derive(Default)]
pub struct CustomerSourceExpiringBuilder {
inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}
const _: () = {
use miniserde::de::{Map, Visitor};
use miniserde::json::Value;
use miniserde::{Deserialize, Result, make_place};
use stripe_types::MapBuilder;
use stripe_types::miniserde_helpers::FromValueOpt;
use super::*;
make_place!(Place);
struct Builder<'a> {
out: &'a mut Option<CustomerSourceExpiring>,
builder: CustomerSourceExpiringBuilder,
}
impl Deserialize for CustomerSourceExpiring {
fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
Place::new(out)
}
}
impl Visitor for Place<CustomerSourceExpiring> {
fn map(&mut self) -> Result<Box<dyn Map + '_>> {
Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
}
}
impl Map for Builder<'_> {
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.builder.key(k)
}
fn finish(&mut self) -> Result<()> {
*self.out = self.builder.take_out();
Ok(())
}
}
impl MapBuilder for CustomerSourceExpiringBuilder {
type Out = CustomerSourceExpiring;
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.inner.key_inner(k)
}
fn deser_default() -> Self {
Self::default()
}
fn take_out(&mut self) -> Option<Self::Out> {
let (k, o) = self.inner.finish_inner()?;
CustomerSourceExpiring::construct(&k, o)
}
}
impl stripe_types::ObjectDeser for CustomerSourceExpiring {
type Builder = CustomerSourceExpiringBuilder;
}
impl CustomerSourceExpiring {
fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
Some(match key {
"card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
"source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
_ => return None,
})
}
}
impl FromValueOpt for CustomerSourceExpiring {
fn from_value(v: Value) -> Option<Self> {
let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
Self::construct(&typ, obj)
}
}
};
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum CustomerSourceUpdated {
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "bank_account"))]
BankAccount(stripe_shared::BankAccount),
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
Card(stripe_shared::Card),
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
Source(stripe_shared::Source),
}
#[derive(Default)]
pub struct CustomerSourceUpdatedBuilder {
inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}
const _: () = {
use miniserde::de::{Map, Visitor};
use miniserde::json::Value;
use miniserde::{Deserialize, Result, make_place};
use stripe_types::MapBuilder;
use stripe_types::miniserde_helpers::FromValueOpt;
use super::*;
make_place!(Place);
struct Builder<'a> {
out: &'a mut Option<CustomerSourceUpdated>,
builder: CustomerSourceUpdatedBuilder,
}
impl Deserialize for CustomerSourceUpdated {
fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
Place::new(out)
}
}
impl Visitor for Place<CustomerSourceUpdated> {
fn map(&mut self) -> Result<Box<dyn Map + '_>> {
Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
}
}
impl Map for Builder<'_> {
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.builder.key(k)
}
fn finish(&mut self) -> Result<()> {
*self.out = self.builder.take_out();
Ok(())
}
}
impl MapBuilder for CustomerSourceUpdatedBuilder {
type Out = CustomerSourceUpdated;
fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
self.inner.key_inner(k)
}
fn deser_default() -> Self {
Self::default()
}
fn take_out(&mut self) -> Option<Self::Out> {
let (k, o) = self.inner.finish_inner()?;
CustomerSourceUpdated::construct(&k, o)
}
}
impl stripe_types::ObjectDeser for CustomerSourceUpdated {
type Builder = CustomerSourceUpdatedBuilder;
}
impl CustomerSourceUpdated {
fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
Some(match key {
"bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
"card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
"source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),
_ => return None,
})
}
}
impl FromValueOpt for CustomerSourceUpdated {
fn from_value(v: Value) -> Option<Self> {
let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
Self::construct(&typ, obj)
}
}
};
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[non_exhaustive]
pub enum EventObject {
AccountApplicationAuthorized(stripe_shared::Application),
AccountApplicationDeauthorized(stripe_shared::Application),
AccountExternalAccountCreated(AccountExternalAccountCreated),
AccountExternalAccountDeleted(AccountExternalAccountDeleted),
AccountExternalAccountUpdated(AccountExternalAccountUpdated),
AccountUpdated(stripe_shared::Account),
ApplicationFeeCreated(stripe_shared::ApplicationFee),
ApplicationFeeRefundUpdated(stripe_shared::ApplicationFeeRefund),
ApplicationFeeRefunded(stripe_shared::ApplicationFee),
#[cfg(feature = "async-stripe-core")]
BalanceAvailable(stripe_core::Balance),
#[cfg(feature = "async-stripe-core")]
BalanceSettingsUpdated(stripe_core::BalanceSettings),
#[cfg(feature = "async-stripe-billing")]
BillingAlertTriggered(stripe_billing::BillingAlertTriggered),
BillingCreditBalanceTransactionCreated(stripe_shared::BillingCreditBalanceTransaction),
BillingCreditGrantCreated(stripe_shared::BillingCreditGrant),
BillingCreditGrantUpdated(stripe_shared::BillingCreditGrant),
#[cfg(feature = "async-stripe-billing")]
BillingMeterCreated(stripe_billing::BillingMeter),
#[cfg(feature = "async-stripe-billing")]
BillingMeterDeactivated(stripe_billing::BillingMeter),
#[cfg(feature = "async-stripe-billing")]
BillingMeterReactivated(stripe_billing::BillingMeter),
#[cfg(feature = "async-stripe-billing")]
BillingMeterUpdated(stripe_billing::BillingMeter),
#[cfg(feature = "async-stripe-billing")]
BillingPortalConfigurationCreated(stripe_billing::BillingPortalConfiguration),
#[cfg(feature = "async-stripe-billing")]
BillingPortalConfigurationUpdated(stripe_billing::BillingPortalConfiguration),
#[cfg(feature = "async-stripe-billing")]
BillingPortalSessionCreated(stripe_billing::BillingPortalSession),
CapabilityUpdated(stripe_shared::Capability),
CashBalanceFundsAvailable(stripe_shared::CashBalance),
ChargeCaptured(stripe_shared::Charge),
ChargeDisputeClosed(stripe_shared::Dispute),
ChargeDisputeCreated(stripe_shared::Dispute),
ChargeDisputeFundsReinstated(stripe_shared::Dispute),
ChargeDisputeFundsWithdrawn(stripe_shared::Dispute),
ChargeDisputeUpdated(stripe_shared::Dispute),
ChargeExpired(stripe_shared::Charge),
ChargeFailed(stripe_shared::Charge),
ChargePending(stripe_shared::Charge),
ChargeRefundUpdated(stripe_shared::Refund),
ChargeRefunded(stripe_shared::Charge),
ChargeSucceeded(stripe_shared::Charge),
ChargeUpdated(stripe_shared::Charge),
CheckoutSessionAsyncPaymentFailed(stripe_shared::CheckoutSession),
CheckoutSessionAsyncPaymentSucceeded(stripe_shared::CheckoutSession),
CheckoutSessionCompleted(stripe_shared::CheckoutSession),
CheckoutSessionExpired(stripe_shared::CheckoutSession),
#[cfg(feature = "async-stripe-misc")]
ClimateOrderCanceled(stripe_misc::ClimateOrder),
#[cfg(feature = "async-stripe-misc")]
ClimateOrderCreated(stripe_misc::ClimateOrder),
#[cfg(feature = "async-stripe-misc")]
ClimateOrderDelayed(stripe_misc::ClimateOrder),
#[cfg(feature = "async-stripe-misc")]
ClimateOrderDelivered(stripe_misc::ClimateOrder),
#[cfg(feature = "async-stripe-misc")]
ClimateOrderProductSubstituted(stripe_misc::ClimateOrder),
#[cfg(feature = "async-stripe-misc")]
ClimateProductCreated(stripe_misc::ClimateProduct),
#[cfg(feature = "async-stripe-misc")]
ClimateProductPricingUpdated(stripe_misc::ClimateProduct),
CouponCreated(stripe_shared::Coupon),
CouponDeleted(stripe_shared::Coupon),
CouponUpdated(stripe_shared::Coupon),
CreditNoteCreated(stripe_shared::CreditNote),
CreditNoteUpdated(stripe_shared::CreditNote),
CreditNoteVoided(stripe_shared::CreditNote),
CustomerCreated(stripe_shared::Customer),
CustomerDeleted(stripe_shared::Customer),
CustomerDiscountCreated(stripe_shared::Discount),
CustomerDiscountDeleted(stripe_shared::Discount),
CustomerDiscountUpdated(stripe_shared::Discount),
CustomerSourceCreated(CustomerSourceCreated),
CustomerSourceDeleted(CustomerSourceDeleted),
CustomerSourceExpiring(CustomerSourceExpiring),
CustomerSourceUpdated(CustomerSourceUpdated),
CustomerSubscriptionCreated(stripe_shared::Subscription),
CustomerSubscriptionDeleted(stripe_shared::Subscription),
CustomerSubscriptionPaused(stripe_shared::Subscription),
CustomerSubscriptionPendingUpdateApplied(stripe_shared::Subscription),
CustomerSubscriptionPendingUpdateExpired(stripe_shared::Subscription),
CustomerSubscriptionResumed(stripe_shared::Subscription),
CustomerSubscriptionTrialWillEnd(stripe_shared::Subscription),
CustomerSubscriptionUpdated(stripe_shared::Subscription),
CustomerTaxIdCreated(stripe_shared::TaxId),
CustomerTaxIdDeleted(stripe_shared::TaxId),
CustomerTaxIdUpdated(stripe_shared::TaxId),
CustomerUpdated(stripe_shared::Customer),
CustomerCashBalanceTransactionCreated(stripe_shared::CustomerCashBalanceTransaction),
#[cfg(feature = "async-stripe-misc")]
EntitlementsActiveEntitlementSummaryUpdated(stripe_misc::EntitlementsActiveEntitlementSummary),
FileCreated(stripe_shared::File),
#[cfg(feature = "async-stripe-misc")]
FinancialConnectionsAccountCreated(stripe_misc::FinancialConnectionsAccount),
#[cfg(feature = "async-stripe-misc")]
FinancialConnectionsAccountDeactivated(stripe_misc::FinancialConnectionsAccount),
#[cfg(feature = "async-stripe-misc")]
FinancialConnectionsAccountDisconnected(stripe_misc::FinancialConnectionsAccount),
#[cfg(feature = "async-stripe-misc")]
FinancialConnectionsAccountReactivated(stripe_misc::FinancialConnectionsAccount),
#[cfg(feature = "async-stripe-misc")]
FinancialConnectionsAccountRefreshedBalance(stripe_misc::FinancialConnectionsAccount),
#[cfg(feature = "async-stripe-misc")]
FinancialConnectionsAccountRefreshedOwnership(stripe_misc::FinancialConnectionsAccount),
#[cfg(feature = "async-stripe-misc")]
FinancialConnectionsAccountRefreshedTransactions(stripe_misc::FinancialConnectionsAccount),
#[cfg(feature = "async-stripe-misc")]
IdentityVerificationSessionCanceled(stripe_misc::IdentityVerificationSession),
#[cfg(feature = "async-stripe-misc")]
IdentityVerificationSessionCreated(stripe_misc::IdentityVerificationSession),
#[cfg(feature = "async-stripe-misc")]
IdentityVerificationSessionProcessing(stripe_misc::IdentityVerificationSession),
#[cfg(feature = "async-stripe-misc")]
IdentityVerificationSessionRedacted(stripe_misc::IdentityVerificationSession),
#[cfg(feature = "async-stripe-misc")]
IdentityVerificationSessionRequiresInput(stripe_misc::IdentityVerificationSession),
#[cfg(feature = "async-stripe-misc")]
IdentityVerificationSessionVerified(stripe_misc::IdentityVerificationSession),
InvoiceCreated(stripe_shared::Invoice),
InvoiceDeleted(stripe_shared::Invoice),
InvoiceFinalizationFailed(stripe_shared::Invoice),
InvoiceFinalized(stripe_shared::Invoice),
InvoiceMarkedUncollectible(stripe_shared::Invoice),
InvoiceOverdue(stripe_shared::Invoice),
InvoiceOverpaid(stripe_shared::Invoice),
InvoicePaid(stripe_shared::Invoice),
InvoicePaymentActionRequired(stripe_shared::Invoice),
InvoicePaymentAttemptRequired(stripe_shared::Invoice),
InvoicePaymentFailed(stripe_shared::Invoice),
InvoicePaymentSucceeded(stripe_shared::Invoice),
InvoiceSent(stripe_shared::Invoice),
InvoiceUpcoming(stripe_shared::Invoice),
InvoiceUpdated(stripe_shared::Invoice),
InvoiceVoided(stripe_shared::Invoice),
InvoiceWillBeDue(stripe_shared::Invoice),
InvoicePaymentPaid(stripe_shared::InvoicePayment),
#[cfg(feature = "async-stripe-billing")]
InvoiceitemCreated(stripe_billing::InvoiceItem),
#[cfg(feature = "async-stripe-billing")]
InvoiceitemDeleted(stripe_billing::InvoiceItem),
IssuingAuthorizationCreated(stripe_shared::IssuingAuthorization),
IssuingAuthorizationRequest(stripe_shared::IssuingAuthorization),
IssuingAuthorizationUpdated(stripe_shared::IssuingAuthorization),
IssuingCardCreated(stripe_shared::IssuingCard),
IssuingCardUpdated(stripe_shared::IssuingCard),
IssuingCardholderCreated(stripe_shared::IssuingCardholder),
IssuingCardholderUpdated(stripe_shared::IssuingCardholder),
IssuingDisputeClosed(stripe_shared::IssuingDispute),
IssuingDisputeCreated(stripe_shared::IssuingDispute),
IssuingDisputeFundsReinstated(stripe_shared::IssuingDispute),
IssuingDisputeFundsRescinded(stripe_shared::IssuingDispute),
IssuingDisputeSubmitted(stripe_shared::IssuingDispute),
IssuingDisputeUpdated(stripe_shared::IssuingDispute),
IssuingPersonalizationDesignActivated(stripe_shared::IssuingPersonalizationDesign),
IssuingPersonalizationDesignDeactivated(stripe_shared::IssuingPersonalizationDesign),
IssuingPersonalizationDesignRejected(stripe_shared::IssuingPersonalizationDesign),
IssuingPersonalizationDesignUpdated(stripe_shared::IssuingPersonalizationDesign),
IssuingTokenCreated(stripe_shared::IssuingToken),
IssuingTokenUpdated(stripe_shared::IssuingToken),
IssuingTransactionCreated(stripe_shared::IssuingTransaction),
IssuingTransactionPurchaseDetailsReceiptUpdated(stripe_shared::IssuingTransaction),
IssuingTransactionUpdated(stripe_shared::IssuingTransaction),
MandateUpdated(stripe_shared::Mandate),
PaymentIntentAmountCapturableUpdated(stripe_shared::PaymentIntent),
PaymentIntentCanceled(stripe_shared::PaymentIntent),
PaymentIntentCreated(stripe_shared::PaymentIntent),
PaymentIntentPartiallyFunded(stripe_shared::PaymentIntent),
PaymentIntentPaymentFailed(stripe_shared::PaymentIntent),
PaymentIntentProcessing(stripe_shared::PaymentIntent),
PaymentIntentRequiresAction(stripe_shared::PaymentIntent),
PaymentIntentSucceeded(stripe_shared::PaymentIntent),
PaymentLinkCreated(stripe_shared::PaymentLink),
PaymentLinkUpdated(stripe_shared::PaymentLink),
PaymentMethodAttached(stripe_shared::PaymentMethod),
PaymentMethodAutomaticallyUpdated(stripe_shared::PaymentMethod),
PaymentMethodDetached(stripe_shared::PaymentMethod),
PaymentMethodUpdated(stripe_shared::PaymentMethod),
PayoutCanceled(stripe_shared::Payout),
PayoutCreated(stripe_shared::Payout),
PayoutFailed(stripe_shared::Payout),
PayoutPaid(stripe_shared::Payout),
PayoutReconciliationCompleted(stripe_shared::Payout),
PayoutUpdated(stripe_shared::Payout),
PersonCreated(stripe_shared::Person),
PersonDeleted(stripe_shared::Person),
PersonUpdated(stripe_shared::Person),
PlanCreated(stripe_shared::Plan),
PlanDeleted(stripe_shared::Plan),
PlanUpdated(stripe_shared::Plan),
PriceCreated(stripe_shared::Price),
PriceDeleted(stripe_shared::Price),
PriceUpdated(stripe_shared::Price),
ProductCreated(stripe_shared::Product),
ProductDeleted(stripe_shared::Product),
ProductUpdated(stripe_shared::Product),
PromotionCodeCreated(stripe_shared::PromotionCode),
PromotionCodeUpdated(stripe_shared::PromotionCode),
#[cfg(feature = "async-stripe-billing")]
QuoteAccepted(stripe_billing::Quote),
#[cfg(feature = "async-stripe-billing")]
QuoteCanceled(stripe_billing::Quote),
#[cfg(feature = "async-stripe-billing")]
QuoteCreated(stripe_billing::Quote),
#[cfg(feature = "async-stripe-billing")]
QuoteFinalized(stripe_billing::Quote),
#[cfg(feature = "async-stripe-fraud")]
RadarEarlyFraudWarningCreated(stripe_fraud::RadarEarlyFraudWarning),
#[cfg(feature = "async-stripe-fraud")]
RadarEarlyFraudWarningUpdated(stripe_fraud::RadarEarlyFraudWarning),
RefundCreated(stripe_shared::Refund),
RefundFailed(stripe_shared::Refund),
RefundUpdated(stripe_shared::Refund),
#[cfg(feature = "async-stripe-misc")]
ReportingReportRunFailed(stripe_misc::ReportingReportRun),
#[cfg(feature = "async-stripe-misc")]
ReportingReportRunSucceeded(stripe_misc::ReportingReportRun),
#[cfg(feature = "async-stripe-misc")]
ReportingReportTypeUpdated(stripe_misc::ReportingReportType),
ReviewClosed(stripe_shared::Review),
ReviewOpened(stripe_shared::Review),
SetupIntentCanceled(stripe_shared::SetupIntent),
SetupIntentCreated(stripe_shared::SetupIntent),
SetupIntentRequiresAction(stripe_shared::SetupIntent),
SetupIntentSetupFailed(stripe_shared::SetupIntent),
SetupIntentSucceeded(stripe_shared::SetupIntent),
#[cfg(feature = "async-stripe-misc")]
SigmaScheduledQueryRunCreated(stripe_misc::ScheduledQueryRun),
SourceCanceled(stripe_shared::Source),
SourceChargeable(stripe_shared::Source),
SourceFailed(stripe_shared::Source),
#[cfg(feature = "async-stripe-payment")]
SourceMandateNotification(stripe_payment::SourceMandateNotification),
SourceRefundAttributesRequired(stripe_shared::Source),
SourceTransactionCreated(stripe_shared::SourceTransaction),
SourceTransactionUpdated(stripe_shared::SourceTransaction),
SubscriptionScheduleAborted(stripe_shared::SubscriptionSchedule),
SubscriptionScheduleCanceled(stripe_shared::SubscriptionSchedule),
SubscriptionScheduleCompleted(stripe_shared::SubscriptionSchedule),
SubscriptionScheduleCreated(stripe_shared::SubscriptionSchedule),
SubscriptionScheduleExpiring(stripe_shared::SubscriptionSchedule),
SubscriptionScheduleReleased(stripe_shared::SubscriptionSchedule),
SubscriptionScheduleUpdated(stripe_shared::SubscriptionSchedule),
#[cfg(feature = "async-stripe-misc")]
TaxSettingsUpdated(stripe_misc::TaxSettings),
TaxRateCreated(stripe_shared::TaxRate),
TaxRateUpdated(stripe_shared::TaxRate),
#[cfg(feature = "async-stripe-terminal")]
TerminalReaderActionFailed(stripe_terminal::TerminalReader),
#[cfg(feature = "async-stripe-terminal")]
TerminalReaderActionSucceeded(stripe_terminal::TerminalReader),
#[cfg(feature = "async-stripe-terminal")]
TerminalReaderActionUpdated(stripe_terminal::TerminalReader),
TestHelpersTestClockAdvancing(stripe_shared::TestHelpersTestClock),
TestHelpersTestClockCreated(stripe_shared::TestHelpersTestClock),
TestHelpersTestClockDeleted(stripe_shared::TestHelpersTestClock),
TestHelpersTestClockInternalFailure(stripe_shared::TestHelpersTestClock),
TestHelpersTestClockReady(stripe_shared::TestHelpersTestClock),
TopupCanceled(stripe_shared::Topup),
TopupCreated(stripe_shared::Topup),
TopupFailed(stripe_shared::Topup),
TopupReversed(stripe_shared::Topup),
TopupSucceeded(stripe_shared::Topup),
TransferCreated(stripe_shared::Transfer),
TransferReversed(stripe_shared::Transfer),
TransferUpdated(stripe_shared::Transfer),
#[cfg(feature = "async-stripe-treasury")]
TreasuryCreditReversalCreated(stripe_treasury::TreasuryCreditReversal),
#[cfg(feature = "async-stripe-treasury")]
TreasuryCreditReversalPosted(stripe_treasury::TreasuryCreditReversal),
#[cfg(feature = "async-stripe-treasury")]
TreasuryDebitReversalCompleted(stripe_treasury::TreasuryDebitReversal),
#[cfg(feature = "async-stripe-treasury")]
TreasuryDebitReversalCreated(stripe_treasury::TreasuryDebitReversal),
#[cfg(feature = "async-stripe-treasury")]
TreasuryDebitReversalInitialCreditGranted(stripe_treasury::TreasuryDebitReversal),
#[cfg(feature = "async-stripe-treasury")]
TreasuryFinancialAccountClosed(stripe_treasury::TreasuryFinancialAccount),
#[cfg(feature = "async-stripe-treasury")]
TreasuryFinancialAccountCreated(stripe_treasury::TreasuryFinancialAccount),
#[cfg(feature = "async-stripe-treasury")]
TreasuryFinancialAccountFeaturesStatusUpdated(stripe_treasury::TreasuryFinancialAccount),
#[cfg(feature = "async-stripe-treasury")]
TreasuryInboundTransferCanceled(stripe_treasury::TreasuryInboundTransfer),
#[cfg(feature = "async-stripe-treasury")]
TreasuryInboundTransferCreated(stripe_treasury::TreasuryInboundTransfer),
#[cfg(feature = "async-stripe-treasury")]
TreasuryInboundTransferFailed(stripe_treasury::TreasuryInboundTransfer),
#[cfg(feature = "async-stripe-treasury")]
TreasuryInboundTransferSucceeded(stripe_treasury::TreasuryInboundTransfer),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundPaymentCanceled(stripe_treasury::TreasuryOutboundPayment),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundPaymentCreated(stripe_treasury::TreasuryOutboundPayment),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundPaymentExpectedArrivalDateUpdated(stripe_treasury::TreasuryOutboundPayment),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundPaymentFailed(stripe_treasury::TreasuryOutboundPayment),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundPaymentPosted(stripe_treasury::TreasuryOutboundPayment),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundPaymentReturned(stripe_treasury::TreasuryOutboundPayment),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundPaymentTrackingDetailsUpdated(stripe_treasury::TreasuryOutboundPayment),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundTransferCanceled(stripe_treasury::TreasuryOutboundTransfer),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundTransferCreated(stripe_treasury::TreasuryOutboundTransfer),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundTransferExpectedArrivalDateUpdated(stripe_treasury::TreasuryOutboundTransfer),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundTransferFailed(stripe_treasury::TreasuryOutboundTransfer),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundTransferPosted(stripe_treasury::TreasuryOutboundTransfer),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundTransferReturned(stripe_treasury::TreasuryOutboundTransfer),
#[cfg(feature = "async-stripe-treasury")]
TreasuryOutboundTransferTrackingDetailsUpdated(stripe_treasury::TreasuryOutboundTransfer),
#[cfg(feature = "async-stripe-treasury")]
TreasuryReceivedCreditCreated(stripe_treasury::TreasuryReceivedCredit),
#[cfg(feature = "async-stripe-treasury")]
TreasuryReceivedCreditFailed(stripe_treasury::TreasuryReceivedCredit),
#[cfg(feature = "async-stripe-treasury")]
TreasuryReceivedCreditSucceeded(stripe_treasury::TreasuryReceivedCredit),
#[cfg(feature = "async-stripe-treasury")]
TreasuryReceivedDebitCreated(stripe_treasury::TreasuryReceivedDebit),
#[cfg_attr(
any(feature = "deserialize", feature = "serialize"),
serde(with = "stripe_types::with_serde_json")
)]
Unknown(miniserde::json::Value),
}
impl EventObject {
pub(crate) fn from_raw_data(typ: &str, data: miniserde::json::Value) -> Option<Self> {
use stripe_types::miniserde_helpers::FromValueOpt;
if typ == "account.application.authorized" {
return FromValueOpt::from_value(data).map(Self::AccountApplicationAuthorized);
}
if typ == "account.application.deauthorized" {
return FromValueOpt::from_value(data).map(Self::AccountApplicationDeauthorized);
}
if typ == "account.external_account.created" {
return FromValueOpt::from_value(data).map(Self::AccountExternalAccountCreated);
}
if typ == "account.external_account.deleted" {
return FromValueOpt::from_value(data).map(Self::AccountExternalAccountDeleted);
}
if typ == "account.external_account.updated" {
return FromValueOpt::from_value(data).map(Self::AccountExternalAccountUpdated);
}
if typ == "account.updated" {
return FromValueOpt::from_value(data).map(Self::AccountUpdated);
}
if typ == "application_fee.created" {
return FromValueOpt::from_value(data).map(Self::ApplicationFeeCreated);
}
if typ == "application_fee.refund.updated" {
return FromValueOpt::from_value(data).map(Self::ApplicationFeeRefundUpdated);
}
if typ == "application_fee.refunded" {
return FromValueOpt::from_value(data).map(Self::ApplicationFeeRefunded);
}
#[cfg(feature = "async-stripe-core")]
if typ == "balance.available" {
return FromValueOpt::from_value(data).map(Self::BalanceAvailable);
}
#[cfg(feature = "async-stripe-core")]
if typ == "balance_settings.updated" {
return FromValueOpt::from_value(data).map(Self::BalanceSettingsUpdated);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "billing.alert.triggered" {
return FromValueOpt::from_value(data).map(Self::BillingAlertTriggered);
}
if typ == "billing.credit_balance_transaction.created" {
return FromValueOpt::from_value(data)
.map(Self::BillingCreditBalanceTransactionCreated);
}
if typ == "billing.credit_grant.created" {
return FromValueOpt::from_value(data).map(Self::BillingCreditGrantCreated);
}
if typ == "billing.credit_grant.updated" {
return FromValueOpt::from_value(data).map(Self::BillingCreditGrantUpdated);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "billing.meter.created" {
return FromValueOpt::from_value(data).map(Self::BillingMeterCreated);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "billing.meter.deactivated" {
return FromValueOpt::from_value(data).map(Self::BillingMeterDeactivated);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "billing.meter.reactivated" {
return FromValueOpt::from_value(data).map(Self::BillingMeterReactivated);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "billing.meter.updated" {
return FromValueOpt::from_value(data).map(Self::BillingMeterUpdated);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "billing_portal.configuration.created" {
return FromValueOpt::from_value(data).map(Self::BillingPortalConfigurationCreated);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "billing_portal.configuration.updated" {
return FromValueOpt::from_value(data).map(Self::BillingPortalConfigurationUpdated);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "billing_portal.session.created" {
return FromValueOpt::from_value(data).map(Self::BillingPortalSessionCreated);
}
if typ == "capability.updated" {
return FromValueOpt::from_value(data).map(Self::CapabilityUpdated);
}
if typ == "cash_balance.funds_available" {
return FromValueOpt::from_value(data).map(Self::CashBalanceFundsAvailable);
}
if typ == "charge.captured" {
return FromValueOpt::from_value(data).map(Self::ChargeCaptured);
}
if typ == "charge.dispute.closed" {
return FromValueOpt::from_value(data).map(Self::ChargeDisputeClosed);
}
if typ == "charge.dispute.created" {
return FromValueOpt::from_value(data).map(Self::ChargeDisputeCreated);
}
if typ == "charge.dispute.funds_reinstated" {
return FromValueOpt::from_value(data).map(Self::ChargeDisputeFundsReinstated);
}
if typ == "charge.dispute.funds_withdrawn" {
return FromValueOpt::from_value(data).map(Self::ChargeDisputeFundsWithdrawn);
}
if typ == "charge.dispute.updated" {
return FromValueOpt::from_value(data).map(Self::ChargeDisputeUpdated);
}
if typ == "charge.expired" {
return FromValueOpt::from_value(data).map(Self::ChargeExpired);
}
if typ == "charge.failed" {
return FromValueOpt::from_value(data).map(Self::ChargeFailed);
}
if typ == "charge.pending" {
return FromValueOpt::from_value(data).map(Self::ChargePending);
}
if typ == "charge.refund.updated" {
return FromValueOpt::from_value(data).map(Self::ChargeRefundUpdated);
}
if typ == "charge.refunded" {
return FromValueOpt::from_value(data).map(Self::ChargeRefunded);
}
if typ == "charge.succeeded" {
return FromValueOpt::from_value(data).map(Self::ChargeSucceeded);
}
if typ == "charge.updated" {
return FromValueOpt::from_value(data).map(Self::ChargeUpdated);
}
if typ == "checkout.session.async_payment_failed" {
return FromValueOpt::from_value(data).map(Self::CheckoutSessionAsyncPaymentFailed);
}
if typ == "checkout.session.async_payment_succeeded" {
return FromValueOpt::from_value(data).map(Self::CheckoutSessionAsyncPaymentSucceeded);
}
if typ == "checkout.session.completed" {
return FromValueOpt::from_value(data).map(Self::CheckoutSessionCompleted);
}
if typ == "checkout.session.expired" {
return FromValueOpt::from_value(data).map(Self::CheckoutSessionExpired);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "climate.order.canceled" {
return FromValueOpt::from_value(data).map(Self::ClimateOrderCanceled);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "climate.order.created" {
return FromValueOpt::from_value(data).map(Self::ClimateOrderCreated);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "climate.order.delayed" {
return FromValueOpt::from_value(data).map(Self::ClimateOrderDelayed);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "climate.order.delivered" {
return FromValueOpt::from_value(data).map(Self::ClimateOrderDelivered);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "climate.order.product_substituted" {
return FromValueOpt::from_value(data).map(Self::ClimateOrderProductSubstituted);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "climate.product.created" {
return FromValueOpt::from_value(data).map(Self::ClimateProductCreated);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "climate.product.pricing_updated" {
return FromValueOpt::from_value(data).map(Self::ClimateProductPricingUpdated);
}
if typ == "coupon.created" {
return FromValueOpt::from_value(data).map(Self::CouponCreated);
}
if typ == "coupon.deleted" {
return FromValueOpt::from_value(data).map(Self::CouponDeleted);
}
if typ == "coupon.updated" {
return FromValueOpt::from_value(data).map(Self::CouponUpdated);
}
if typ == "credit_note.created" {
return FromValueOpt::from_value(data).map(Self::CreditNoteCreated);
}
if typ == "credit_note.updated" {
return FromValueOpt::from_value(data).map(Self::CreditNoteUpdated);
}
if typ == "credit_note.voided" {
return FromValueOpt::from_value(data).map(Self::CreditNoteVoided);
}
if typ == "customer.created" {
return FromValueOpt::from_value(data).map(Self::CustomerCreated);
}
if typ == "customer.deleted" {
return FromValueOpt::from_value(data).map(Self::CustomerDeleted);
}
if typ == "customer.discount.created" {
return FromValueOpt::from_value(data).map(Self::CustomerDiscountCreated);
}
if typ == "customer.discount.deleted" {
return FromValueOpt::from_value(data).map(Self::CustomerDiscountDeleted);
}
if typ == "customer.discount.updated" {
return FromValueOpt::from_value(data).map(Self::CustomerDiscountUpdated);
}
if typ == "customer.source.created" {
return FromValueOpt::from_value(data).map(Self::CustomerSourceCreated);
}
if typ == "customer.source.deleted" {
return FromValueOpt::from_value(data).map(Self::CustomerSourceDeleted);
}
if typ == "customer.source.expiring" {
return FromValueOpt::from_value(data).map(Self::CustomerSourceExpiring);
}
if typ == "customer.source.updated" {
return FromValueOpt::from_value(data).map(Self::CustomerSourceUpdated);
}
if typ == "customer.subscription.created" {
return FromValueOpt::from_value(data).map(Self::CustomerSubscriptionCreated);
}
if typ == "customer.subscription.deleted" {
return FromValueOpt::from_value(data).map(Self::CustomerSubscriptionDeleted);
}
if typ == "customer.subscription.paused" {
return FromValueOpt::from_value(data).map(Self::CustomerSubscriptionPaused);
}
if typ == "customer.subscription.pending_update_applied" {
return FromValueOpt::from_value(data)
.map(Self::CustomerSubscriptionPendingUpdateApplied);
}
if typ == "customer.subscription.pending_update_expired" {
return FromValueOpt::from_value(data)
.map(Self::CustomerSubscriptionPendingUpdateExpired);
}
if typ == "customer.subscription.resumed" {
return FromValueOpt::from_value(data).map(Self::CustomerSubscriptionResumed);
}
if typ == "customer.subscription.trial_will_end" {
return FromValueOpt::from_value(data).map(Self::CustomerSubscriptionTrialWillEnd);
}
if typ == "customer.subscription.updated" {
return FromValueOpt::from_value(data).map(Self::CustomerSubscriptionUpdated);
}
if typ == "customer.tax_id.created" {
return FromValueOpt::from_value(data).map(Self::CustomerTaxIdCreated);
}
if typ == "customer.tax_id.deleted" {
return FromValueOpt::from_value(data).map(Self::CustomerTaxIdDeleted);
}
if typ == "customer.tax_id.updated" {
return FromValueOpt::from_value(data).map(Self::CustomerTaxIdUpdated);
}
if typ == "customer.updated" {
return FromValueOpt::from_value(data).map(Self::CustomerUpdated);
}
if typ == "customer_cash_balance_transaction.created" {
return FromValueOpt::from_value(data).map(Self::CustomerCashBalanceTransactionCreated);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "entitlements.active_entitlement_summary.updated" {
return FromValueOpt::from_value(data)
.map(Self::EntitlementsActiveEntitlementSummaryUpdated);
}
if typ == "file.created" {
return FromValueOpt::from_value(data).map(Self::FileCreated);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "financial_connections.account.created" {
return FromValueOpt::from_value(data).map(Self::FinancialConnectionsAccountCreated);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "financial_connections.account.deactivated" {
return FromValueOpt::from_value(data)
.map(Self::FinancialConnectionsAccountDeactivated);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "financial_connections.account.disconnected" {
return FromValueOpt::from_value(data)
.map(Self::FinancialConnectionsAccountDisconnected);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "financial_connections.account.reactivated" {
return FromValueOpt::from_value(data)
.map(Self::FinancialConnectionsAccountReactivated);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "financial_connections.account.refreshed_balance" {
return FromValueOpt::from_value(data)
.map(Self::FinancialConnectionsAccountRefreshedBalance);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "financial_connections.account.refreshed_ownership" {
return FromValueOpt::from_value(data)
.map(Self::FinancialConnectionsAccountRefreshedOwnership);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "financial_connections.account.refreshed_transactions" {
return FromValueOpt::from_value(data)
.map(Self::FinancialConnectionsAccountRefreshedTransactions);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "identity.verification_session.canceled" {
return FromValueOpt::from_value(data).map(Self::IdentityVerificationSessionCanceled);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "identity.verification_session.created" {
return FromValueOpt::from_value(data).map(Self::IdentityVerificationSessionCreated);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "identity.verification_session.processing" {
return FromValueOpt::from_value(data).map(Self::IdentityVerificationSessionProcessing);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "identity.verification_session.redacted" {
return FromValueOpt::from_value(data).map(Self::IdentityVerificationSessionRedacted);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "identity.verification_session.requires_input" {
return FromValueOpt::from_value(data)
.map(Self::IdentityVerificationSessionRequiresInput);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "identity.verification_session.verified" {
return FromValueOpt::from_value(data).map(Self::IdentityVerificationSessionVerified);
}
if typ == "invoice.created" {
return FromValueOpt::from_value(data).map(Self::InvoiceCreated);
}
if typ == "invoice.deleted" {
return FromValueOpt::from_value(data).map(Self::InvoiceDeleted);
}
if typ == "invoice.finalization_failed" {
return FromValueOpt::from_value(data).map(Self::InvoiceFinalizationFailed);
}
if typ == "invoice.finalized" {
return FromValueOpt::from_value(data).map(Self::InvoiceFinalized);
}
if typ == "invoice.marked_uncollectible" {
return FromValueOpt::from_value(data).map(Self::InvoiceMarkedUncollectible);
}
if typ == "invoice.overdue" {
return FromValueOpt::from_value(data).map(Self::InvoiceOverdue);
}
if typ == "invoice.overpaid" {
return FromValueOpt::from_value(data).map(Self::InvoiceOverpaid);
}
if typ == "invoice.paid" {
return FromValueOpt::from_value(data).map(Self::InvoicePaid);
}
if typ == "invoice.payment_action_required" {
return FromValueOpt::from_value(data).map(Self::InvoicePaymentActionRequired);
}
if typ == "invoice.payment_attempt_required" {
return FromValueOpt::from_value(data).map(Self::InvoicePaymentAttemptRequired);
}
if typ == "invoice.payment_failed" {
return FromValueOpt::from_value(data).map(Self::InvoicePaymentFailed);
}
if typ == "invoice.payment_succeeded" {
return FromValueOpt::from_value(data).map(Self::InvoicePaymentSucceeded);
}
if typ == "invoice.sent" {
return FromValueOpt::from_value(data).map(Self::InvoiceSent);
}
if typ == "invoice.upcoming" {
return FromValueOpt::from_value(data).map(Self::InvoiceUpcoming);
}
if typ == "invoice.updated" {
return FromValueOpt::from_value(data).map(Self::InvoiceUpdated);
}
if typ == "invoice.voided" {
return FromValueOpt::from_value(data).map(Self::InvoiceVoided);
}
if typ == "invoice.will_be_due" {
return FromValueOpt::from_value(data).map(Self::InvoiceWillBeDue);
}
if typ == "invoice_payment.paid" {
return FromValueOpt::from_value(data).map(Self::InvoicePaymentPaid);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "invoiceitem.created" {
return FromValueOpt::from_value(data).map(Self::InvoiceitemCreated);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "invoiceitem.deleted" {
return FromValueOpt::from_value(data).map(Self::InvoiceitemDeleted);
}
if typ == "issuing_authorization.created" {
return FromValueOpt::from_value(data).map(Self::IssuingAuthorizationCreated);
}
if typ == "issuing_authorization.request" {
return FromValueOpt::from_value(data).map(Self::IssuingAuthorizationRequest);
}
if typ == "issuing_authorization.updated" {
return FromValueOpt::from_value(data).map(Self::IssuingAuthorizationUpdated);
}
if typ == "issuing_card.created" {
return FromValueOpt::from_value(data).map(Self::IssuingCardCreated);
}
if typ == "issuing_card.updated" {
return FromValueOpt::from_value(data).map(Self::IssuingCardUpdated);
}
if typ == "issuing_cardholder.created" {
return FromValueOpt::from_value(data).map(Self::IssuingCardholderCreated);
}
if typ == "issuing_cardholder.updated" {
return FromValueOpt::from_value(data).map(Self::IssuingCardholderUpdated);
}
if typ == "issuing_dispute.closed" {
return FromValueOpt::from_value(data).map(Self::IssuingDisputeClosed);
}
if typ == "issuing_dispute.created" {
return FromValueOpt::from_value(data).map(Self::IssuingDisputeCreated);
}
if typ == "issuing_dispute.funds_reinstated" {
return FromValueOpt::from_value(data).map(Self::IssuingDisputeFundsReinstated);
}
if typ == "issuing_dispute.funds_rescinded" {
return FromValueOpt::from_value(data).map(Self::IssuingDisputeFundsRescinded);
}
if typ == "issuing_dispute.submitted" {
return FromValueOpt::from_value(data).map(Self::IssuingDisputeSubmitted);
}
if typ == "issuing_dispute.updated" {
return FromValueOpt::from_value(data).map(Self::IssuingDisputeUpdated);
}
if typ == "issuing_personalization_design.activated" {
return FromValueOpt::from_value(data).map(Self::IssuingPersonalizationDesignActivated);
}
if typ == "issuing_personalization_design.deactivated" {
return FromValueOpt::from_value(data)
.map(Self::IssuingPersonalizationDesignDeactivated);
}
if typ == "issuing_personalization_design.rejected" {
return FromValueOpt::from_value(data).map(Self::IssuingPersonalizationDesignRejected);
}
if typ == "issuing_personalization_design.updated" {
return FromValueOpt::from_value(data).map(Self::IssuingPersonalizationDesignUpdated);
}
if typ == "issuing_token.created" {
return FromValueOpt::from_value(data).map(Self::IssuingTokenCreated);
}
if typ == "issuing_token.updated" {
return FromValueOpt::from_value(data).map(Self::IssuingTokenUpdated);
}
if typ == "issuing_transaction.created" {
return FromValueOpt::from_value(data).map(Self::IssuingTransactionCreated);
}
if typ == "issuing_transaction.purchase_details_receipt_updated" {
return FromValueOpt::from_value(data)
.map(Self::IssuingTransactionPurchaseDetailsReceiptUpdated);
}
if typ == "issuing_transaction.updated" {
return FromValueOpt::from_value(data).map(Self::IssuingTransactionUpdated);
}
if typ == "mandate.updated" {
return FromValueOpt::from_value(data).map(Self::MandateUpdated);
}
if typ == "payment_intent.amount_capturable_updated" {
return FromValueOpt::from_value(data).map(Self::PaymentIntentAmountCapturableUpdated);
}
if typ == "payment_intent.canceled" {
return FromValueOpt::from_value(data).map(Self::PaymentIntentCanceled);
}
if typ == "payment_intent.created" {
return FromValueOpt::from_value(data).map(Self::PaymentIntentCreated);
}
if typ == "payment_intent.partially_funded" {
return FromValueOpt::from_value(data).map(Self::PaymentIntentPartiallyFunded);
}
if typ == "payment_intent.payment_failed" {
return FromValueOpt::from_value(data).map(Self::PaymentIntentPaymentFailed);
}
if typ == "payment_intent.processing" {
return FromValueOpt::from_value(data).map(Self::PaymentIntentProcessing);
}
if typ == "payment_intent.requires_action" {
return FromValueOpt::from_value(data).map(Self::PaymentIntentRequiresAction);
}
if typ == "payment_intent.succeeded" {
return FromValueOpt::from_value(data).map(Self::PaymentIntentSucceeded);
}
if typ == "payment_link.created" {
return FromValueOpt::from_value(data).map(Self::PaymentLinkCreated);
}
if typ == "payment_link.updated" {
return FromValueOpt::from_value(data).map(Self::PaymentLinkUpdated);
}
if typ == "payment_method.attached" {
return FromValueOpt::from_value(data).map(Self::PaymentMethodAttached);
}
if typ == "payment_method.automatically_updated" {
return FromValueOpt::from_value(data).map(Self::PaymentMethodAutomaticallyUpdated);
}
if typ == "payment_method.detached" {
return FromValueOpt::from_value(data).map(Self::PaymentMethodDetached);
}
if typ == "payment_method.updated" {
return FromValueOpt::from_value(data).map(Self::PaymentMethodUpdated);
}
if typ == "payout.canceled" {
return FromValueOpt::from_value(data).map(Self::PayoutCanceled);
}
if typ == "payout.created" {
return FromValueOpt::from_value(data).map(Self::PayoutCreated);
}
if typ == "payout.failed" {
return FromValueOpt::from_value(data).map(Self::PayoutFailed);
}
if typ == "payout.paid" {
return FromValueOpt::from_value(data).map(Self::PayoutPaid);
}
if typ == "payout.reconciliation_completed" {
return FromValueOpt::from_value(data).map(Self::PayoutReconciliationCompleted);
}
if typ == "payout.updated" {
return FromValueOpt::from_value(data).map(Self::PayoutUpdated);
}
if typ == "person.created" {
return FromValueOpt::from_value(data).map(Self::PersonCreated);
}
if typ == "person.deleted" {
return FromValueOpt::from_value(data).map(Self::PersonDeleted);
}
if typ == "person.updated" {
return FromValueOpt::from_value(data).map(Self::PersonUpdated);
}
if typ == "plan.created" {
return FromValueOpt::from_value(data).map(Self::PlanCreated);
}
if typ == "plan.deleted" {
return FromValueOpt::from_value(data).map(Self::PlanDeleted);
}
if typ == "plan.updated" {
return FromValueOpt::from_value(data).map(Self::PlanUpdated);
}
if typ == "price.created" {
return FromValueOpt::from_value(data).map(Self::PriceCreated);
}
if typ == "price.deleted" {
return FromValueOpt::from_value(data).map(Self::PriceDeleted);
}
if typ == "price.updated" {
return FromValueOpt::from_value(data).map(Self::PriceUpdated);
}
if typ == "product.created" {
return FromValueOpt::from_value(data).map(Self::ProductCreated);
}
if typ == "product.deleted" {
return FromValueOpt::from_value(data).map(Self::ProductDeleted);
}
if typ == "product.updated" {
return FromValueOpt::from_value(data).map(Self::ProductUpdated);
}
if typ == "promotion_code.created" {
return FromValueOpt::from_value(data).map(Self::PromotionCodeCreated);
}
if typ == "promotion_code.updated" {
return FromValueOpt::from_value(data).map(Self::PromotionCodeUpdated);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "quote.accepted" {
return FromValueOpt::from_value(data).map(Self::QuoteAccepted);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "quote.canceled" {
return FromValueOpt::from_value(data).map(Self::QuoteCanceled);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "quote.created" {
return FromValueOpt::from_value(data).map(Self::QuoteCreated);
}
#[cfg(feature = "async-stripe-billing")]
if typ == "quote.finalized" {
return FromValueOpt::from_value(data).map(Self::QuoteFinalized);
}
#[cfg(feature = "async-stripe-fraud")]
if typ == "radar.early_fraud_warning.created" {
return FromValueOpt::from_value(data).map(Self::RadarEarlyFraudWarningCreated);
}
#[cfg(feature = "async-stripe-fraud")]
if typ == "radar.early_fraud_warning.updated" {
return FromValueOpt::from_value(data).map(Self::RadarEarlyFraudWarningUpdated);
}
if typ == "refund.created" {
return FromValueOpt::from_value(data).map(Self::RefundCreated);
}
if typ == "refund.failed" {
return FromValueOpt::from_value(data).map(Self::RefundFailed);
}
if typ == "refund.updated" {
return FromValueOpt::from_value(data).map(Self::RefundUpdated);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "reporting.report_run.failed" {
return FromValueOpt::from_value(data).map(Self::ReportingReportRunFailed);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "reporting.report_run.succeeded" {
return FromValueOpt::from_value(data).map(Self::ReportingReportRunSucceeded);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "reporting.report_type.updated" {
return FromValueOpt::from_value(data).map(Self::ReportingReportTypeUpdated);
}
if typ == "review.closed" {
return FromValueOpt::from_value(data).map(Self::ReviewClosed);
}
if typ == "review.opened" {
return FromValueOpt::from_value(data).map(Self::ReviewOpened);
}
if typ == "setup_intent.canceled" {
return FromValueOpt::from_value(data).map(Self::SetupIntentCanceled);
}
if typ == "setup_intent.created" {
return FromValueOpt::from_value(data).map(Self::SetupIntentCreated);
}
if typ == "setup_intent.requires_action" {
return FromValueOpt::from_value(data).map(Self::SetupIntentRequiresAction);
}
if typ == "setup_intent.setup_failed" {
return FromValueOpt::from_value(data).map(Self::SetupIntentSetupFailed);
}
if typ == "setup_intent.succeeded" {
return FromValueOpt::from_value(data).map(Self::SetupIntentSucceeded);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "sigma.scheduled_query_run.created" {
return FromValueOpt::from_value(data).map(Self::SigmaScheduledQueryRunCreated);
}
if typ == "source.canceled" {
return FromValueOpt::from_value(data).map(Self::SourceCanceled);
}
if typ == "source.chargeable" {
return FromValueOpt::from_value(data).map(Self::SourceChargeable);
}
if typ == "source.failed" {
return FromValueOpt::from_value(data).map(Self::SourceFailed);
}
#[cfg(feature = "async-stripe-payment")]
if typ == "source.mandate_notification" {
return FromValueOpt::from_value(data).map(Self::SourceMandateNotification);
}
if typ == "source.refund_attributes_required" {
return FromValueOpt::from_value(data).map(Self::SourceRefundAttributesRequired);
}
if typ == "source.transaction.created" {
return FromValueOpt::from_value(data).map(Self::SourceTransactionCreated);
}
if typ == "source.transaction.updated" {
return FromValueOpt::from_value(data).map(Self::SourceTransactionUpdated);
}
if typ == "subscription_schedule.aborted" {
return FromValueOpt::from_value(data).map(Self::SubscriptionScheduleAborted);
}
if typ == "subscription_schedule.canceled" {
return FromValueOpt::from_value(data).map(Self::SubscriptionScheduleCanceled);
}
if typ == "subscription_schedule.completed" {
return FromValueOpt::from_value(data).map(Self::SubscriptionScheduleCompleted);
}
if typ == "subscription_schedule.created" {
return FromValueOpt::from_value(data).map(Self::SubscriptionScheduleCreated);
}
if typ == "subscription_schedule.expiring" {
return FromValueOpt::from_value(data).map(Self::SubscriptionScheduleExpiring);
}
if typ == "subscription_schedule.released" {
return FromValueOpt::from_value(data).map(Self::SubscriptionScheduleReleased);
}
if typ == "subscription_schedule.updated" {
return FromValueOpt::from_value(data).map(Self::SubscriptionScheduleUpdated);
}
#[cfg(feature = "async-stripe-misc")]
if typ == "tax.settings.updated" {
return FromValueOpt::from_value(data).map(Self::TaxSettingsUpdated);
}
if typ == "tax_rate.created" {
return FromValueOpt::from_value(data).map(Self::TaxRateCreated);
}
if typ == "tax_rate.updated" {
return FromValueOpt::from_value(data).map(Self::TaxRateUpdated);
}
#[cfg(feature = "async-stripe-terminal")]
if typ == "terminal.reader.action_failed" {
return FromValueOpt::from_value(data).map(Self::TerminalReaderActionFailed);
}
#[cfg(feature = "async-stripe-terminal")]
if typ == "terminal.reader.action_succeeded" {
return FromValueOpt::from_value(data).map(Self::TerminalReaderActionSucceeded);
}
#[cfg(feature = "async-stripe-terminal")]
if typ == "terminal.reader.action_updated" {
return FromValueOpt::from_value(data).map(Self::TerminalReaderActionUpdated);
}
if typ == "test_helpers.test_clock.advancing" {
return FromValueOpt::from_value(data).map(Self::TestHelpersTestClockAdvancing);
}
if typ == "test_helpers.test_clock.created" {
return FromValueOpt::from_value(data).map(Self::TestHelpersTestClockCreated);
}
if typ == "test_helpers.test_clock.deleted" {
return FromValueOpt::from_value(data).map(Self::TestHelpersTestClockDeleted);
}
if typ == "test_helpers.test_clock.internal_failure" {
return FromValueOpt::from_value(data).map(Self::TestHelpersTestClockInternalFailure);
}
if typ == "test_helpers.test_clock.ready" {
return FromValueOpt::from_value(data).map(Self::TestHelpersTestClockReady);
}
if typ == "topup.canceled" {
return FromValueOpt::from_value(data).map(Self::TopupCanceled);
}
if typ == "topup.created" {
return FromValueOpt::from_value(data).map(Self::TopupCreated);
}
if typ == "topup.failed" {
return FromValueOpt::from_value(data).map(Self::TopupFailed);
}
if typ == "topup.reversed" {
return FromValueOpt::from_value(data).map(Self::TopupReversed);
}
if typ == "topup.succeeded" {
return FromValueOpt::from_value(data).map(Self::TopupSucceeded);
}
if typ == "transfer.created" {
return FromValueOpt::from_value(data).map(Self::TransferCreated);
}
if typ == "transfer.reversed" {
return FromValueOpt::from_value(data).map(Self::TransferReversed);
}
if typ == "transfer.updated" {
return FromValueOpt::from_value(data).map(Self::TransferUpdated);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.credit_reversal.created" {
return FromValueOpt::from_value(data).map(Self::TreasuryCreditReversalCreated);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.credit_reversal.posted" {
return FromValueOpt::from_value(data).map(Self::TreasuryCreditReversalPosted);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.debit_reversal.completed" {
return FromValueOpt::from_value(data).map(Self::TreasuryDebitReversalCompleted);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.debit_reversal.created" {
return FromValueOpt::from_value(data).map(Self::TreasuryDebitReversalCreated);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.debit_reversal.initial_credit_granted" {
return FromValueOpt::from_value(data)
.map(Self::TreasuryDebitReversalInitialCreditGranted);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.financial_account.closed" {
return FromValueOpt::from_value(data).map(Self::TreasuryFinancialAccountClosed);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.financial_account.created" {
return FromValueOpt::from_value(data).map(Self::TreasuryFinancialAccountCreated);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.financial_account.features_status_updated" {
return FromValueOpt::from_value(data)
.map(Self::TreasuryFinancialAccountFeaturesStatusUpdated);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.inbound_transfer.canceled" {
return FromValueOpt::from_value(data).map(Self::TreasuryInboundTransferCanceled);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.inbound_transfer.created" {
return FromValueOpt::from_value(data).map(Self::TreasuryInboundTransferCreated);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.inbound_transfer.failed" {
return FromValueOpt::from_value(data).map(Self::TreasuryInboundTransferFailed);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.inbound_transfer.succeeded" {
return FromValueOpt::from_value(data).map(Self::TreasuryInboundTransferSucceeded);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_payment.canceled" {
return FromValueOpt::from_value(data).map(Self::TreasuryOutboundPaymentCanceled);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_payment.created" {
return FromValueOpt::from_value(data).map(Self::TreasuryOutboundPaymentCreated);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_payment.expected_arrival_date_updated" {
return FromValueOpt::from_value(data)
.map(Self::TreasuryOutboundPaymentExpectedArrivalDateUpdated);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_payment.failed" {
return FromValueOpt::from_value(data).map(Self::TreasuryOutboundPaymentFailed);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_payment.posted" {
return FromValueOpt::from_value(data).map(Self::TreasuryOutboundPaymentPosted);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_payment.returned" {
return FromValueOpt::from_value(data).map(Self::TreasuryOutboundPaymentReturned);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_payment.tracking_details_updated" {
return FromValueOpt::from_value(data)
.map(Self::TreasuryOutboundPaymentTrackingDetailsUpdated);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_transfer.canceled" {
return FromValueOpt::from_value(data).map(Self::TreasuryOutboundTransferCanceled);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_transfer.created" {
return FromValueOpt::from_value(data).map(Self::TreasuryOutboundTransferCreated);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_transfer.expected_arrival_date_updated" {
return FromValueOpt::from_value(data)
.map(Self::TreasuryOutboundTransferExpectedArrivalDateUpdated);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_transfer.failed" {
return FromValueOpt::from_value(data).map(Self::TreasuryOutboundTransferFailed);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_transfer.posted" {
return FromValueOpt::from_value(data).map(Self::TreasuryOutboundTransferPosted);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_transfer.returned" {
return FromValueOpt::from_value(data).map(Self::TreasuryOutboundTransferReturned);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.outbound_transfer.tracking_details_updated" {
return FromValueOpt::from_value(data)
.map(Self::TreasuryOutboundTransferTrackingDetailsUpdated);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.received_credit.created" {
return FromValueOpt::from_value(data).map(Self::TreasuryReceivedCreditCreated);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.received_credit.failed" {
return FromValueOpt::from_value(data).map(Self::TreasuryReceivedCreditFailed);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.received_credit.succeeded" {
return FromValueOpt::from_value(data).map(Self::TreasuryReceivedCreditSucceeded);
}
#[cfg(feature = "async-stripe-treasury")]
if typ == "treasury.received_debit.created" {
return FromValueOpt::from_value(data).map(Self::TreasuryReceivedDebitCreated);
}
Some(Self::Unknown(data))
}
}