Class: PatchScimV2GroupsGroupIDResponseMeta

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



18509
18510
18511
18512
18513
18514
18515
18516
# File 'lib/schemas.rb', line 18509

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    created:       d["created"],
    last_modified: d["lastModified"],
    resource_type: d["resourceType"],
  )
end

.from_json!(json) ⇒ Object



18518
18519
18520
# File 'lib/schemas.rb', line 18518

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



18522
18523
18524
18525
18526
18527
18528
# File 'lib/schemas.rb', line 18522

def to_dynamic
  {
    "created"      => created,
    "lastModified" => last_modified,
    "resourceType" => resource_type,
  }
end

#to_json(options = nil) ⇒ Object



18530
18531
18532
# File 'lib/schemas.rb', line 18530

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end