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 raw_request #1431

Merged
merged 3 commits into from
Jul 10, 2024
Merged

Add raw_request #1431

merged 3 commits into from
Jul 10, 2024

Conversation

helenye-stripe
Copy link
Contributor

@helenye-stripe helenye-stripe commented Jul 10, 2024

Add raw request to stripe-ruby GA. Previously only available to stripe-ruby beta. This is an alternative to using the old StripeClient.request to make these requests.

Changelog

  • Adds the ability to make raw requests to the Stripe API, by providing an HTTP method and url. This is an alternative to using Stripe::APIResource.request(...) to make custom requests, which is discouraged and will be broken in a future major version.

@helenye-stripe helenye-stripe requested review from a team and xavdid-stripe and removed request for a team July 10, 2024 20:46
Copy link
Contributor

@anniel-stripe anniel-stripe left a comment

Choose a reason for hiding this comment

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

Can we add a section in the README with usage instructions as well (similar to what's in the beta README: https://github.com/stripe/stripe-ruby/tree/beta?tab=readme-ov-file#custom-requests)?

Copy link
Contributor

@anniel-stripe anniel-stripe left a comment

Choose a reason for hiding this comment

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

LGTM! I updated the Changelog as I believe that Stripe::APIResource.request(...) was the old way of making custom requests (defined here). We may want to consider removing this alias completely when GAing StripeClient and directing users to use raw_request instead.

Maybe we should deprecate the APIResource::request alias in a follow-up?

@helenye-stripe
Copy link
Contributor Author

Ahh, I misunderstood. Thanks! I'll also update the README.

@helenye-stripe helenye-stripe enabled auto-merge (squash) July 10, 2024 21:34
@helenye-stripe helenye-stripe merged commit 816fe0d into master Jul 10, 2024
13 checks passed
@helenye-stripe helenye-stripe deleted the helenye-raw-request branch July 10, 2024 21:34
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