Class: OpConnect::APIRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/op_connect/api_request.rb,
lib/op_connect/api_request/actor.rb,
lib/op_connect/api_request/resource.rb

Defined Under Namespace

Classes: Actor, Resource

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ APIRequest

Returns a new instance of APIRequest.



8
9
10
11
12
13
14
15
# File 'lib/op_connect/api_request.rb', line 8

def initialize(options = {})
  @request_id = options["request_id"]
  @timestamp = options["timestamp"]
  @action = options["action"]
  @result = options["result"]
  @actor = Actor.new(options["actor"])
  @resource = Resource.new(options["resource"])
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



6
7
8
# File 'lib/op_connect/api_request.rb', line 6

def action
  @action
end

#actorObject (readonly)

Returns the value of attribute actor.



6
7
8
# File 'lib/op_connect/api_request.rb', line 6

def actor
  @actor
end

#request_idObject (readonly)

Returns the value of attribute request_id.



6
7
8
# File 'lib/op_connect/api_request.rb', line 6

def request_id
  @request_id
end

#resourceObject (readonly)

Returns the value of attribute resource.



6
7
8
# File 'lib/op_connect/api_request.rb', line 6

def resource
  @resource
end

#resultObject (readonly)

Returns the value of attribute result.



6
7
8
# File 'lib/op_connect/api_request.rb', line 6

def result
  @result
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



6
7
8
# File 'lib/op_connect/api_request.rb', line 6

def timestamp
  @timestamp
end