Class: PatchScimV2GroupsGroupIDResponse

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



18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
# File 'lib/schemas.rb', line 18552

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    display_name:                                d["displayName"],
    external_id:                                 d["externalId"],
    id:                                          d["id"],
    patch_scim_v2_groups_group_id_response_meta: d["meta"] ? PatchScimV2GroupsGroupIDResponseMeta.from_dynamic!(d["meta"]) : nil,
    schemas:                                     d["schemas"],
  )
end

.from_json!(json) ⇒ Object



18563
18564
18565
# File 'lib/schemas.rb', line 18563

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

Instance Method Details

#to_dynamicObject



18567
18568
18569
18570
18571
18572
18573
18574
18575
# File 'lib/schemas.rb', line 18567

def to_dynamic
  {
    "displayName" => display_name,
    "externalId"  => external_id,
    "id"          => id,
    "meta"        => patch_scim_v2_groups_group_id_response_meta&.to_dynamic,
    "schemas"     => schemas,
  }
end

#to_json(options = nil) ⇒ Object



18577
18578
18579
# File 'lib/schemas.rb', line 18577

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