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.
1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 |
# File 'lib/models/porcelain.rb', line 1088 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 @metadata = == 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.
1078 1079 1080 |
# File 'lib/models/porcelain.rb', line 1078 def actor_id @actor_id end |
#id ⇒ Object
The access request event id.
1080 1081 1082 |
# File 'lib/models/porcelain.rb', line 1080 def id @id end |
#metadata ⇒ Object
The metadata about the event
1082 1083 1084 |
# File 'lib/models/porcelain.rb', line 1082 def @metadata end |
#request_id ⇒ Object
The request that the event is bound to.
1084 1085 1086 |
# File 'lib/models/porcelain.rb', line 1084 def request_id @request_id end |
#type ⇒ Object
The type of event.
1086 1087 1088 |
# File 'lib/models/porcelain.rb', line 1086 def type @type end |
Instance Method Details
#to_json(options = {}) ⇒ Object
1102 1103 1104 1105 1106 1107 1108 |
# File 'lib/models/porcelain.rb', line 1102 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 |