-
Notifications
You must be signed in to change notification settings - Fork 572
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
Init options with forced parameter values #1699
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I'm okay with the change, I think this is a breaking change. While the current behaviour is a bug, changing it would change the number of results returned in List endpoints.
Also we really should consider adding something that can fetch a list of IPaymentSource like we have (or used to?) in java. Not being able to list all payment sources (I can't say payment methods though I want to) is really confusing.
+1 Remi's comments, but LGTM otherwise. (Thanks for the quick fix!) |
* Better string enums (#1675) * Init options with default parameter values (#1699) * Remove multiple deprecated features (#1713) Many features were marked as obsolete and are now being removed: * AccountBalance on Customer, use Balance instead * Billing on Subscription/Invoice/SubscriptionSchedule, use CollectionMethod instead * TaxInfo and TaxInfoVerification on Customer, use TaxId instead * AllowedSourceTypes on PaymentIntent, use PaymentMethodTypes instead * Start on Subscription, use StartDate instead * ApplicationFee on Charge, use ApplicationFeeAmount instead * Date when listing Invoices, use Created instead * OperatorAccount on all Terminal APIs * Remove all Expand* fields (#1715) * Use properl SetupIntent class * Removed Id and FileId suffixes to stay as close to the API as possible. (#1738) * Add a test to ensure that JSON names match property names (#1744) * A few more renames (#1739) * Remove dead code for service expansions (#1751) * Bump Stylecop.Analyzers to latest version (#1752) * Bump SourceLink and create symbol package (#1755) * Fix all classes not inheriting from the generic version of StripeEntity * Add a wholesome test to ensure proper JSON converters are applied (#1761) * Remove more deprecated stuff (#1802) * Remove more Id/FileId suffixes (#1803) * One more rename (#1805) * Fix ExternalAccountUpdateOptions (#1806) * Rename AccountOpener to Representative and move to latest API version * Enable test for JSON<->property name consistency (#1804)
r? @remi-stripe @brandur-stripe
Some options classes have forced parameter values, e.g.
CardListOptions
always includesobject=card
. However if the user passesnull
then the parameter is not sent.This is kind of an ugly ad-hoc fix. Ideally we would always create an instance of the appropriate options class, but doing this would require us to make all the helper methods in
Service
generic to accept the options class as a type param, and I'd rather not do that just yet.Fixes #1676.