-
Notifications
You must be signed in to change notification settings - Fork 32
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
Concrete Routes Don't Allow Optional Values #76
Comments
That shouldn’t be the case and works fine for me. Even in my test cases. If you look at |
This compiles fine for me let stripe = try req.make(StripeClient.self)
return try stripe.customer.create(email: registration.email).flatMap { customer in |
Hmmmm. That's strange
|
You sure you have the latest version of the provider? |
.package(url: "https://github.com/vapor-community/stripe-provider.git", from: "2.2.0"), |
That's interesting. I have no idea why you're getting a compile error. Get rid of the build folder, delete |
A new version of the provider was just released also. Although those changes were in previous release try the latest and see if that helps |
.package(url: "https://github.com/vapor-community/stripe-provider.git", from: "2.2.1"), In Package.resolved
.build was also delete This is the output.
|
Where you able to figure this out? I don’t think anyone else has had this problem. |
I ran into the issue of trying to create a customer with only an email and description. Normally most parameters are optional. This is true in the Model and also in the protocol for CustomerRoutes.swift. The issue lies in the fact that the implementation StripeCustomerRoutes doesn't set the optional values to = nil like the extension of the protocol. This causes the parameter to be required or else you will receive an error to the one bellow.
The text was updated successfully, but these errors were encountered: