Class: WorkOS::AuditLogExport
- Inherits:
-
Object
- Object
- WorkOS::AuditLogExport
- Includes:
- HashProvider
- Defined in:
- lib/workos/audit_logs/audit_log_export.rb
Constant Summary collapse
- HASH_ATTRS =
{ object: :object, id: :id, state: :state, url: :url, created_at: :created_at, updated_at: :updated_at }.freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#object ⇒ Object
Returns the value of attribute object.
-
#state ⇒ Object
Returns the value of attribute state.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(json) ⇒ AuditLogExport
constructor
A new instance of AuditLogExport.
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ AuditLogExport
Returns a new instance of AuditLogExport.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/workos/audit_logs/audit_log_export.rb', line 28 def initialize(json) hash = json.is_a?(Hash) ? json : JSON.parse(json, symbolize_names: true) hash = hash.transform_keys(&:to_sym) if hash.keys.first.is_a?(String) @object = hash[:object] @id = hash[:id] @state = hash[:state] @url = hash[:url] @created_at = hash[:created_at] @updated_at = hash[:updated_at] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
20 21 22 |
# File 'lib/workos/audit_logs/audit_log_export.rb', line 20 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
20 21 22 |
# File 'lib/workos/audit_logs/audit_log_export.rb', line 20 def id @id end |
#object ⇒ Object
Returns the value of attribute object.
20 21 22 |
# File 'lib/workos/audit_logs/audit_log_export.rb', line 20 def object @object end |
#state ⇒ Object
Returns the value of attribute state.
20 21 22 |
# File 'lib/workos/audit_logs/audit_log_export.rb', line 20 def state @state end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
20 21 22 |
# File 'lib/workos/audit_logs/audit_log_export.rb', line 20 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
20 21 22 |
# File 'lib/workos/audit_logs/audit_log_export.rb', line 20 def url @url end |