Skip to content

Commit

Permalink
Billing Portal session (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
thoven87 authored Oct 20, 2024
1 parent 46c9f95 commit 5c579be
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Sources/StripeKit/Core Resources/Events/Event.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public enum EventObject: Codable {
case applicationFee(ApplicationFee)
case applicationFeeRefund(ApplicationFeeRefund)
case balance(Balance)
case billingPortalSession(PortalSession)
case capability(Capability)
case charge(Charge)
case dispute(Dispute)
Expand Down Expand Up @@ -104,7 +105,7 @@ public enum EventObject: Codable {
case price(Price)
case product(Product)
case promotionCode(PromotionCode)
case earlyFraudWarniing(EarlyFraudWarning)
case earlyFraudWarning(EarlyFraudWarning)
case quote(Quote)
case reportRun(ReportRun)
case reportType(ReportType)
Expand Down Expand Up @@ -138,6 +139,8 @@ public enum EventObject: Codable {
self = try .bankAccount(BankAccount(from: decoder))
case "billing_portal.configuration":
self = try .configuration(PortalConfiguration(from: decoder))
case "billing_portal.session":
self = try .billingPortalSession(PortalSession(from: decoder))
case "fee_refund":
self = try .applicationFeeRefund(ApplicationFeeRefund(from: decoder))
case "balance":
Expand Down Expand Up @@ -203,7 +206,7 @@ public enum EventObject: Codable {
case "promotion_code":
self = try .promotionCode(PromotionCode(from: decoder))
case "radar.early_fraud_warning":
self = try .earlyFraudWarniing(EarlyFraudWarning(from: decoder))
self = try .earlyFraudWarning(EarlyFraudWarning(from: decoder))
case "quote":
self = try .quote(Quote(from: decoder))
case "reporting.report_run":
Expand Down Expand Up @@ -247,6 +250,8 @@ public enum EventObject: Codable {
try cashBalance.encode(to: encoder)
case .bankAccount(let bankAccount):
try bankAccount.encode(to: encoder)
case .billingPortalSession(let portalSession):
try portalSession.encode(to: encoder)
case .applicationFee(let applicationFee):
try applicationFee.encode(to: encoder)
case .applicationFeeRefund(let applicationFeeRefund):
Expand Down Expand Up @@ -313,7 +318,7 @@ public enum EventObject: Codable {
try product.encode(to: encoder)
case .promotionCode(let promotionCode):
try promotionCode.encode(to: encoder)
case .earlyFraudWarniing(let earlyFraudWarning):
case .earlyFraudWarning(let earlyFraudWarning):
try earlyFraudWarning.encode(to: encoder)
case .quote(let quote):
try quote.encode(to: encoder)
Expand Down

0 comments on commit 5c579be

Please sign in to comment.