A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/stripe/stripe-ruby/issues/1616 below:

APIResource#refresh does not work if object is from a webhook event · Issue #1616 · stripe/stripe-ruby · GitHub

Describe the bug

While attempting to upgrade our SDK version from 12.6.0 to the latest, I noticed that calling #refresh on an StripeObject received from a webhook event no longer works.

This breaks our integration in a number of places since we currently depend on that behavior to fetch the latest version of a resource.

NoMethodError - undefined method `execute_request_initialize_from' for nil:NilClass
--
  | lib/procedures/stripe_procedures.rb:538:in `stripe_update_customer_subscriptions_with_tax'
  | lib/billing/community.rb:125:in `_handle_customer_updated'
  | lib/billing/community.rb:68:in `handle_community_event'
  | controllers/stripe_webhooks.rb:313:in `_handle_stripe_event'
  | controllers/stripe_webhooks.rb:144:in `block in <class:App>'
  | lib/core/sinatra.rb:33:in `route_eval'
  | est/controllers/controller_testing_mixin.rb:143:in `post'
  | lib/test/stripe_webhooks.rb:29:in `send_stripe_webhook'
To Reproduce
  1. Receive a webhook event
  2. Decode the event using event = Stripe::Webhook.construct_event(...)
  3. Call event.data.object.refresh
Expected behavior

Calling event.data.object.refresh re-fetches the object

Code snippets OS

Linux

Language version

Ruby

Library version

stripe-ruby v15.1.0

API version

2019-02-19

Additional context

No response


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4