Class: EasyPost::Hooks::RequestContext

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method:, path:, headers:, request_body:, request_timestamp:, request_uuid:) ⇒ RequestContext

Returns a new instance of RequestContext.



6
7
8
9
10
11
12
13
14
15
# File 'lib/easypost/hooks/request_context.rb', line 6

def initialize(method:, path:, headers:, request_body:, request_timestamp:, request_uuid:)
  @method = method
  @path = path
  @headers = headers
  @request_body = request_body
  @request_timestamp = request_timestamp
  @request_uuid = request_uuid

  freeze
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



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

def headers
  @headers
end

#methodObject (readonly)

Returns the value of attribute method.



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

def method
  @method
end

#pathObject (readonly)

Returns the value of attribute path.



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

def path
  @path
end

#request_bodyObject (readonly)

Returns the value of attribute request_body.



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

def request_body
  @request_body
end

#request_timestampObject (readonly)

Returns the value of attribute request_timestamp.



4
5
6
# File 'lib/easypost/hooks/request_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/request_context.rb', line 4

def request_uuid
  @request_uuid
end