Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Billing Portal session #271

Merged
merged 2 commits into from
Oct 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading