Class: WorkOS::AuditLogSchemaJsonTarget

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/audit_logs/audit_log_schema_json_target.rb

Constant Summary collapse

HASH_ATTRS =
{
  type: :type,
  metadata: :metadata
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ AuditLogSchemaJsonTarget

Returns a new instance of AuditLogSchemaJsonTarget.



16
17
18
19
20
# File 'lib/workos/audit_logs/audit_log_schema_json_target.rb', line 16

def initialize(json)
  hash = self.class.normalize(json)
  @type = hash[:type]
  @metadata = hash[:metadata] || {}
end

Instance Attribute Details

#metadataObject

Returns the value of attribute metadata.



12
13
14
# File 'lib/workos/audit_logs/audit_log_schema_json_target.rb', line 12

def 
  @metadata
end

#typeObject

Returns the value of attribute type.



12
13
14
# File 'lib/workos/audit_logs/audit_log_schema_json_target.rb', line 12

def type
  @type
end