Class: PatchScimV2GroupsGroupIDBody

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



18474
18475
18476
18477
18478
18479
18480
# File 'lib/schemas.rb', line 18474

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    operations: d["Operations"]&.map { |x| PatchScimV2GroupsGroupIDBodyOperationsItem.from_dynamic!(x) },
    schemas:    d["schemas"],
  )
end

.from_json!(json) ⇒ Object



18482
18483
18484
# File 'lib/schemas.rb', line 18482

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

Instance Method Details

#to_dynamicObject



18486
18487
18488
18489
18490
18491
# File 'lib/schemas.rb', line 18486

def to_dynamic
  {
    "Operations" => operations&.map { |x| x.to_dynamic },
    "schemas"    => schemas,
  }
end

#to_json(options = nil) ⇒ Object



18493
18494
18495
# File 'lib/schemas.rb', line 18493

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