Class: WorkOS::AuditLogsRetention
- Inherits:
-
Object
- Object
- WorkOS::AuditLogsRetention
- Includes:
- HashProvider
- Defined in:
- lib/workos/organizations/audit_logs_retention.rb
Constant Summary collapse
- HASH_ATTRS =
{ retention_period_in_days: :retention_period_in_days }.freeze
Instance Attribute Summary collapse
-
#retention_period_in_days ⇒ Object
Returns the value of attribute retention_period_in_days.
Instance Method Summary collapse
-
#initialize(json) ⇒ AuditLogsRetention
constructor
A new instance of AuditLogsRetention.
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ AuditLogsRetention
Returns a new instance of AuditLogsRetention.
17 18 19 20 21 |
# File 'lib/workos/organizations/audit_logs_retention.rb', line 17 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) @retention_period_in_days = hash[:retention_period_in_days] end |
Instance Attribute Details
#retention_period_in_days ⇒ Object
Returns the value of attribute retention_period_in_days.
15 16 17 |
# File 'lib/workos/organizations/audit_logs_retention.rb', line 15 def retention_period_in_days @retention_period_in_days end |