Class: Stripe::Instrumentation::ResponseContext

Inherits:
Object
  • Object
show all
Defined in:
lib/stripe/instrumentation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_status:, response:) ⇒ ResponseContext

Returns a new instance of ResponseContext.



71
72
73
74
75
# File 'lib/stripe/instrumentation.rb', line 71

def initialize(http_status:, response:)
  @http_status = http_status
  @header = response ? response.to_hash : nil
  @body = response ? response.body : nil
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



69
70
71
# File 'lib/stripe/instrumentation.rb', line 69

def body
  @body
end

#headerObject (readonly)

Returns the value of attribute header.



69
70
71
# File 'lib/stripe/instrumentation.rb', line 69

def header
  @header
end

#http_statusObject (readonly)

Returns the value of attribute http_status.



69
70
71
# File 'lib/stripe/instrumentation.rb', line 69

def http_status
  @http_status
end