Subscription schedule phase prorationBehavior missing case
Environment:
Xcode 15.3
Swift 5.10.0
vapor 4.55.4
stripe-kit 24.0.0
Stripe API 2023-08-16
---
I have an issue creating / updating a subscription schedule with a phase with a `prorationBehavior` of case `always_invoice`. This is because the `SubscriptionSchedulePhase.prorationBehavior` enum is missing the `always_invoice` case.
From the docs:
"enum. always_invoice / create_prorations / none"
https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-phases-proration_behavior
Here's an example updating a subscription schedule's phases:
```Swift
let _ = try await req.stripe.subscriptionSchedules
.update(
schedule: schedule.id,
metadata: nil,
phases: [
[
"items": [["price": priceID]],
"proration_behavior": SubscriptionProrationBehavior.alwaysInvoice.rawValue, // MISSING CASE
"start_date": Int(nextBillDate.timeIntervalSince1970),
],
],
prorationBehavior: nil,
defaultSettings: nil,
endBehavior: .release,
expand: nil
)
```
关闭于 2024-07-17 0 条评论