Skip to content

Commit 5b44f43

Browse files
committed
Fixed event mapping case for billing portal session
1 parent 41750a4 commit 5b44f43

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/StripeKit/Core Resources/Events/Event.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public enum EventObject: Codable {
7474
case applicationFee(ApplicationFee)
7575
case applicationFeeRefund(ApplicationFeeRefund)
7676
case balance(Balance)
77-
case billingPortalSessionCreated(PortalSession)
77+
case billingPortalSession(PortalSession)
7878
case capability(Capability)
7979
case charge(Charge)
8080
case dispute(Dispute)
@@ -139,8 +139,8 @@ public enum EventObject: Codable {
139139
self = try .bankAccount(BankAccount(from: decoder))
140140
case "billing_portal.configuration":
141141
self = try .configuration(PortalConfiguration(from: decoder))
142-
case "billing_portal.session.created":
143-
self = try .billingPortalSessionCreated(PortalSession(from: decoder))
142+
case "billing_portal.session":
143+
self = try .billingPortalSession(PortalSession(from: decoder))
144144
case "fee_refund":
145145
self = try .applicationFeeRefund(ApplicationFeeRefund(from: decoder))
146146
case "balance":
@@ -250,7 +250,7 @@ public enum EventObject: Codable {
250250
try cashBalance.encode(to: encoder)
251251
case .bankAccount(let bankAccount):
252252
try bankAccount.encode(to: encoder)
253-
case .billingPortalSessionCreated(let portalSession):
253+
case .billingPortalSession(let portalSession):
254254
try portalSession.encode(to: encoder)
255255
case .applicationFee(let applicationFee):
256256
try applicationFee.encode(to: encoder)

0 commit comments

Comments
 (0)