Remove public idempotent_replayed message (#1553)

This commit is contained in:
helenye-stripe 2025-03-25 07:18:28 -07:00 committed by GitHub
parent 72c36f9500
commit cdbade3e57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 9 deletions

View File

@ -31,13 +31,6 @@ module Stripe
ErrorObject.construct_from(@json_body[:error], {}, nil, :v1)
end
# Whether the error was the result of an idempotent replay, meaning that it
# originally occurred on a previous request and is being replayed back
# because the user sent the same idempotency key for this one.
def idempotent_replayed?
@idempotent_replayed
end
def to_s
status_string = @http_status.nil? ? "" : "(Status #{@http_status}) "
id_string = @request_id.nil? ? "" : "(Request #{@request_id}) "

View File

@ -17,12 +17,12 @@ module Stripe
context "#idempotent_replayed?" do
should "initialize from header" do
e = StripeError.new("message", http_headers: { "idempotent-replayed" => "true" })
assert_equal true, e.idempotent_replayed?
assert_equal true, e.instance_variable_get(:@idempotent_replayed)
end
should "be 'falsey' by default" do
e = StripeError.new("message")
refute_equal true, e.idempotent_replayed?
refute_equal true, e.instance_variable_get(:@idempotent_replayed)
end
end