Class: PatchScimV2GroupsGroupIDBodyOperationsItemValue

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



18405
18406
18407
18408
18409
18410
18411
# File 'lib/schemas.rb', line 18405

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    display_name: d["displayName"],
    id:           d["id"],
  )
end

.from_json!(json) ⇒ Object



18413
18414
18415
# File 'lib/schemas.rb', line 18413

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

Instance Method Details

#to_dynamicObject



18417
18418
18419
18420
18421
18422
# File 'lib/schemas.rb', line 18417

def to_dynamic
  {
    "displayName" => display_name,
    "id"          => id,
  }
end

#to_json(options = nil) ⇒ Object



18424
18425
18426
# File 'lib/schemas.rb', line 18424

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