diff --git a/src/ids.rs b/src/ids.rs index 1da2e29e..12c06236 100644 --- a/src/ids.rs +++ b/src/ids.rs @@ -493,10 +493,13 @@ def_id!(FileId, "file_"); def_id!(FileLinkId, "link_"); def_id!(InvoiceId, "in_", { _ }); def_id!(InvoiceItemId, "ii_"); +def_id!(InvoiceLineItemIdWebhook, "il_"); + def_id!( enum InvoiceLineItemId { Item(InvoiceItemId), Subscription(SubscriptionLineId), + InvoiceLineItemIdWebhook(InvoiceLineItemIdWebhook), } ); def_id!(IssuingAuthorizationId, "iauth_"); @@ -508,7 +511,7 @@ def_id!(OrderId, "or_"); def_id!(OrderReturnId, "orret_"); def_id!(MandateId: String); // TODO: Figure out what prefix this id has def_id!(PaymentIntentId, "pi_"); -def_id!(PaymentMethodId, "pm"); +def_id!(PaymentMethodId, "pm" | "card"); def_id!( enum PaymentSourceId { Account(AccountId), diff --git a/src/resources/event.rs b/src/resources/event.rs index 2db3a6f6..43f78618 100644 --- a/src/resources/event.rs +++ b/src/resources/event.rs @@ -138,6 +138,8 @@ pub enum EventType { PaymentIntentRequiresCapture, #[serde(rename = "payment_intent.succeeded")] PaymentIntentSucceeded, + #[serde(rename = "payment_method.attached")] + PaymentMethodAttached, #[serde(rename = "payout.canceled")] PayoutCanceled, #[serde(rename = "payout.created")] @@ -212,6 +214,7 @@ pub enum EventObject { ApplicationFeeRefund(ApplicationFeeRefund), Balance(Balance), BankAccount(BankAccount), + Card(Card), Charge(Charge), Customer(Customer), Dispute(Dispute), @@ -223,6 +226,7 @@ pub enum EventObject { InvoiceItem(InvoiceItem), Order(Order), OrderReturn(OrderReturn), + PaymentMethod(PaymentMethod), PaymentIntent(PaymentIntent), Payout(Payout), Plan(Plan),