Class: SDM::AccessRequestEvent
- Inherits:
-
Object
- Object
- SDM::AccessRequestEvent
- Defined in:
- lib/models/porcelain.rb
Overview
AccessRequestEvents hold information about events related to an access request such as creation, approval and denial.
Instance Attribute Summary collapse
-
#actor_id ⇒ Object
The account responsible for the event.
-
#id ⇒ Object
The access request event id.
-
#metadata ⇒ Object
The metadata about the event.
-
#request_id ⇒ Object
The request that the event is bound to.
-
#type ⇒ Object
The type of event.
Instance Method Summary collapse
-
#initialize(actor_id: nil, id: nil, metadata: nil, request_id: nil, type: nil) ⇒ AccessRequestEvent
constructor
A new instance of AccessRequestEvent.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(actor_id: nil, id: nil, metadata: nil, request_id: nil, type: nil) ⇒ AccessRequestEvent
Returns a new instance of AccessRequestEvent.
1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 |
# File 'lib/models/porcelain.rb', line 1332 def initialize( actor_id: nil, id: nil, metadata: nil, request_id: nil, type: nil ) @actor_id = actor_id == nil ? "" : actor_id @id = id == nil ? "" : id = == nil ? "" : @request_id = request_id == nil ? "" : request_id @type = type == nil ? "" : type end |
Instance Attribute Details
#actor_id ⇒ Object
The account responsible for the event.
1322 1323 1324 |
# File 'lib/models/porcelain.rb', line 1322 def actor_id @actor_id end |
#id ⇒ Object
The access request event id.
1324 1325 1326 |
# File 'lib/models/porcelain.rb', line 1324 def id @id end |
#metadata ⇒ Object
The metadata about the event
1326 1327 1328 |
# File 'lib/models/porcelain.rb', line 1326 def end |
#request_id ⇒ Object
The request that the event is bound to.
1328 1329 1330 |
# File 'lib/models/porcelain.rb', line 1328 def request_id @request_id end |
#type ⇒ Object
The type of event.
1330 1331 1332 |
# File 'lib/models/porcelain.rb', line 1330 def type @type end |
Instance Method Details
#to_json(options = {}) ⇒ Object
1346 1347 1348 1349 1350 1351 1352 |
# File 'lib/models/porcelain.rb', line 1346 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |