Skip to content

Commit cdbade3

Browse files
Remove public idempotent_replayed message (#1553)
1 parent 72c36f9 commit cdbade3

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

lib/stripe/errors.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ def construct_error_object
3131
ErrorObject.construct_from(@json_body[:error], {}, nil, :v1)
3232
end
3333

34-
# Whether the error was the result of an idempotent replay, meaning that it
35-
# originally occurred on a previous request and is being replayed back
36-
# because the user sent the same idempotency key for this one.
37-
def idempotent_replayed?
38-
@idempotent_replayed
39-
end
40-
4134
def to_s
4235
status_string = @http_status.nil? ? "" : "(Status #{@http_status}) "
4336
id_string = @request_id.nil? ? "" : "(Request #{@request_id}) "

test/stripe/errors_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ class StripeErrorTest < Test::Unit::TestCase
1717
context "#idempotent_replayed?" do
1818
should "initialize from header" do
1919
e = StripeError.new("message", http_headers: { "idempotent-replayed" => "true" })
20-
assert_equal true, e.idempotent_replayed?
20+
assert_equal true, e.instance_variable_get(:@idempotent_replayed)
2121
end
2222

2323
should "be 'falsey' by default" do
2424
e = StripeError.new("message")
25-
refute_equal true, e.idempotent_replayed?
25+
refute_equal true, e.instance_variable_get(:@idempotent_replayed)
2626
end
2727
end
2828

0 commit comments

Comments
 (0)