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.
757 758 759 760 761 762 763 764 765 766 767 768 769 |
# File 'lib/models/porcelain.rb', line 757 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.
747 748 749 |
# File 'lib/models/porcelain.rb', line 747 def actor_id @actor_id end |
#id ⇒ Object
The access request event id.
749 750 751 |
# File 'lib/models/porcelain.rb', line 749 def id @id end |
#metadata ⇒ Object
The metadata about the event
751 752 753 |
# File 'lib/models/porcelain.rb', line 751 def @metadata end |
#request_id ⇒ Object
The request that the event is bound to.
753 754 755 |
# File 'lib/models/porcelain.rb', line 753 def request_id @request_id end |
#type ⇒ Object
The type of event.
755 756 757 |
# File 'lib/models/porcelain.rb', line 755 def type @type end |
Instance Method Details
#to_json(options = {}) ⇒ Object
771 772 773 774 775 776 777 |
# File 'lib/models/porcelain.rb', line 771 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 |