Class: PatchScimV2UsersUserIDResponseName

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



18952
18953
18954
18955
18956
18957
18958
# File 'lib/schemas.rb', line 18952

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    family_name: d["familyName"],
    given_name:  d["givenName"],
  )
end

.from_json!(json) ⇒ Object



18960
18961
18962
# File 'lib/schemas.rb', line 18960

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

Instance Method Details

#to_dynamicObject



18964
18965
18966
18967
18968
18969
# File 'lib/schemas.rb', line 18964

def to_dynamic
  {
    "familyName" => family_name,
    "givenName"  => given_name,
  }
end

#to_json(options = nil) ⇒ Object



18971
18972
18973
# File 'lib/schemas.rb', line 18971

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