class Stripe::StripeClient::RequestLogContext
RequestLogContext
stores information about a request that's begin made so that we can log certain information. It's useful because it means that we don't have to pass around as many parameters.
Attributes
account[RW]
api_key[RW]
api_version[RW]
body[RW]
idempotency_key[RW]
method[RW]
path[RW]
query[RW]
request_id[RW]
Public Instance Methods
dup_from_response_headers(headers)
click to toggle source
The idea with this method is that we might want to update some of context information because a response that we've received from the API contains information that's more authoritative than what we started with for a request. For example, we should trust whatever came back in a `Stripe-Version` header beyond what configuration information that we might have had available.
# File lib/stripe/stripe_client.rb, line 967 def dup_from_response_headers(headers) context = dup context.account = headers["Stripe-Account"] context.api_version = headers["Stripe-Version"] context.idempotency_key = headers["Idempotency-Key"] context.request_id = headers["Request-Id"] context end