Skip to content
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

Add method parameter type classes to all resources and services #1505

Merged
merged 8 commits into from
Dec 20, 2024

Conversation

helenye-stripe
Copy link
Contributor

@helenye-stripe helenye-stripe commented Dec 17, 2024

Why?

This adds classes for all methods, with publicly available params explicitly listed for all params. This provides more clarity into what parameters are available per method, and adds RBIs (not yet included in gem) to describe each class.

What?

Adds the params classes as children of Stripe::RequestParams. Please review commit-by-commit. All manual changes should be obvious based on their commit name (the only large commit is the Generated changes commit). Sorry about the size here 😓 . If you are interested at peeking at the specific files in the generated commit, it will be easier to pull the branch.

Changelog

  • Add method parameter classes for all resources and service methods.
    • This change is NOT breaking and is purely additive. The method parameter classes are not required, we still accept hashes as well as the new RequestParams classes. Any additional gated parameters are still available to pass via hash.

@helenye-stripe helenye-stripe changed the title Helenye params Add parameter type classes to all resources and services Dec 17, 2024
@helenye-stripe helenye-stripe changed the title Add parameter type classes to all resources and services Add method parameter type classes to all resources and services Dec 17, 2024
@helenye-stripe helenye-stripe marked this pull request as ready for review December 17, 2024 17:36
Copy link
Member

@xavdid-stripe xavdid-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great! super minor formatting suggestions, but 👍 otherwise.

I agree with the explicit initialization approach - the goal is strong typing and the better our intelisense, the better the experience.

@helenye-stripe helenye-stripe merged commit bc1d5a8 into beta Dec 20, 2024
14 checks passed
@helenye-stripe helenye-stripe deleted the helenye-params branch December 20, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants