Class: EasyPost::Hooks::ResponseContext

Inherits:
Object
  • Object
show all
Defined in:
lib/easypost/hooks/response_context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_status:, method:, path:, headers:, response_body:, request_timestamp:, response_timestamp:, request_uuid:, client_response_object:) ⇒ ResponseContext

Returns a new instance of ResponseContext.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/easypost/hooks/response_context.rb', line 8

def initialize(http_status:, method:, path:, headers:, response_body:,
               request_timestamp:, response_timestamp:, request_uuid:,
               client_response_object:)
  @http_status = http_status
  @method = method
  @path = path
  @headers = headers
  @response_body = response_body
  @request_timestamp = request_timestamp
  @response_timestamp = response_timestamp
  @request_uuid = request_uuid
  @client_response_object = client_response_object

  freeze
end

Instance Attribute Details

#client_response_objectObject (readonly)

Returns the value of attribute client_response_object.



4
5
6
# File 'lib/easypost/hooks/response_context.rb', line 4

def client_response_object
  @client_response_object
end

#headersObject (readonly)

Returns the value of attribute headers.



4
5
6
# File 'lib/easypost/hooks/response_context.rb', line 4

def headers
  @headers
end

#http_statusObject (readonly)

Returns the value of attribute http_status.



4
5
6
# File 'lib/easypost/hooks/response_context.rb', line 4

def http_status
  @http_status
end

#methodObject (readonly)

Returns the value of attribute method.



4
5
6
# File 'lib/easypost/hooks/response_context.rb', line 4

def method
  @method
end

#pathObject (readonly)

Returns the value of attribute path.



4
5
6
# File 'lib/easypost/hooks/response_context.rb', line 4

def path
  @path
end

#request_timestampObject (readonly)

Returns the value of attribute request_timestamp.



4
5
6
# File 'lib/easypost/hooks/response_context.rb', line 4

def request_timestamp
  @request_timestamp
end

#request_uuidObject (readonly)

Returns the value of attribute request_uuid.



4
5
6
# File 'lib/easypost/hooks/response_context.rb', line 4

def request_uuid
  @request_uuid
end

#response_bodyObject (readonly)

Returns the value of attribute response_body.



4
5
6
# File 'lib/easypost/hooks/response_context.rb', line 4

def response_body
  @response_body
end

#response_timestampObject (readonly)

Returns the value of attribute response_timestamp.



4
5
6
# File 'lib/easypost/hooks/response_context.rb', line 4

def response_timestamp
  @response_timestamp
end