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

TaxId objects are failing to delete #1333

Closed
tmoore95 opened this issue Feb 15, 2024 · 3 comments
Closed

TaxId objects are failing to delete #1333

tmoore95 opened this issue Feb 15, 2024 · 3 comments
Assignees
Labels

Comments

@tmoore95
Copy link

Describe the bug

After upgrading to 10.8.0 one of our tests started failing due to an issue with retrieving the customer when deleting a TaxId object. It looks like the tax id itself is being passed in as the customer id in lib/stripe/resources/tax_id.rb:44 in this commit.

To Reproduce

Upgrade to version 10.8.0 of the gem, fetch a TaxId object and then call delete on it.

Expected behavior

It should get deleted, but instead it raises the following error: <Stripe::InvalidRequestError: (Status 404) (Request <request_id>) No such customer: <tax_id>>

Code snippets

def delete(params = {}, opts = {})
  request_stripe_object(
    method: :delete,
    path: format("/v1/customers/%<customer>s/tax_ids/%<id>s", { customer: CGI.escape(self["id"]), id: CGI.escape(id) }),
    params: params,
    opts: opts
  )
end

OS

macOS

Language version

Ruby 3.3.0

Library version

stripe-ruby 10.8.0

API version

2023-10-16

Additional context

No response

@helenye-stripe
Copy link
Contributor

Hi @tmoore95! Thanks for bringing this to our attention. This should be fixed in #1329 and will be included in this week's release.

@helenye-stripe helenye-stripe self-assigned this Feb 15, 2024
@tmoore95
Copy link
Author

Hi @tmoore95! Thanks for bringing this to our attention. This should be fixed in #1329 and will be included in this week's release.

Great, thanks for the swift response!

@helenye-stripe
Copy link
Contributor

Thanks again for bringing this up! This should be fixed as of v10.9.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants