Add explicit attributes for fields in resources, and rbis for resources #1490
+37,585
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why?
This is the first step in #1479 - this adds explicit attributes for fields in resources, and adds RBIs with type annotations for them. This is not yet ready for use as it does not define any methods, so I have not included the RBIs in the gemspec.
What?
I recommend reviewing this mostly through the codegen PR, as this is almost entirely generated changes.
Important notes:
lib/stripe/resources/amount.rb
andrbi/stripe/resources/amount.rbi
because it is a type used in V2.StripeObject.add_accessors
(lib/stripe/stripe_object.rb
) to appropriately set instance variables upon creation..rubocop.yml
to ignore variable numbers, since we have field names in various conventions in the API.