Class: PatchScimV2GroupsGroupIDBodyOperationsItem

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



18440
18441
18442
18443
18444
18445
18446
18447
# File 'lib/schemas.rb', line 18440

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    op:    d["op"],
    path:  d["path"],
    value: d["value"] ? PatchScimV2GroupsGroupIDBodyOperationsItemValue.from_dynamic!(d["value"]) : nil,
  )
end

.from_json!(json) ⇒ Object



18449
18450
18451
# File 'lib/schemas.rb', line 18449

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

Instance Method Details

#to_dynamicObject



18453
18454
18455
18456
18457
18458
18459
# File 'lib/schemas.rb', line 18453

def to_dynamic
  {
    "op"    => op,
    "path"  => path,
    "value" => value&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



18461
18462
18463
# File 'lib/schemas.rb', line 18461

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