mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-06-02 00:00:35 -04:00
Remove public idempotent_replayed message (#1553)
This commit is contained in:
parent
72c36f9500
commit
cdbade3e57
@ -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}) "
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user