Subscription schedule fromSubscription incorrect type
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 where creating a subscription schedule with an existing subscription ID returns an error. This is because `SubscriptionSchedule.fromSubscription` is currently a `Bool` when it should be a `String`.
From the docs:
"string. Migrate an existing subscription to be managed by a subscription schedule."
https://docs.stripe.com/api/subscription_schedules/create#create_subscription_schedule-from_subscription
Here an example error returned from Stripe:
```JSON
{
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such subscription: 'true'",
"param": "from_subscription",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_123",
"type": "invalid_request_error"
}
}
```
关闭于 2024-07-17 0 条评论