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

Merge and codegen from master stripe-ruby v13.0.0 #1465

Merged
merged 5 commits into from
Oct 3, 2024

Conversation

helenye-stripe
Copy link
Contributor

@helenye-stripe helenye-stripe commented Oct 3, 2024

Why?

This is the merge from master after v13.0.0. It removes Preview from beta as well in favor of raw request.

  • Added deprecation warnings in stripe.rb

I also codegenned as part of this, but shouldn't cause any issues.

Changelog

  • Remove Stripe::Preview. Use StripeClient#raw_request instead (see below).
  • Marked Stripe.raw_request and Stripe.deserialize as deprecated. Use StripeClient#raw_request and StripeClient#deserialize instead. In StripeClient, the params and opts parameters are passed as keyword arguments:
    # Before
    resp = Stripe.raw_request(:post, "v1/charges", , {p1: "p1"}, {stripe_account: "acct_123"})
    charge = Stripe.deserialize(resp.data)
    
    # After
    client = StripeClient.new("sk_test_123") 
    resp = client.raw_request(:post, "/v1/charges", params: {p1: "p1"}, opts: {stripe_account: "acct_123"})
    charge = client.deserialize(resp.data)

@helenye-stripe helenye-stripe marked this pull request as draft October 3, 2024 14:54
@helenye-stripe helenye-stripe marked this pull request as ready for review October 3, 2024 15:29
@helenye-stripe helenye-stripe requested review from a team and jar-stripe and removed request for a team October 3, 2024 15:30
Copy link
Contributor

@prathmesh-stripe prathmesh-stripe left a comment

Choose a reason for hiding this comment

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

Apart from the above pointed version change, rest of the PR is fine.

@prathmesh-stripe prathmesh-stripe merged commit 41f5d0a into beta Oct 3, 2024
14 checks passed
@prathmesh-stripe prathmesh-stripe deleted the helenye/merge-ruby-beta branch October 3, 2024 20:32
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.

3 participants