Class: PutScimV2UsersUserIDBodyName

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



34357
34358
34359
34360
34361
34362
34363
# File 'lib/schemas.rb', line 34357

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

.from_json!(json) ⇒ Object



34365
34366
34367
# File 'lib/schemas.rb', line 34365

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

Instance Method Details

#to_dynamicObject



34369
34370
34371
34372
34373
34374
# File 'lib/schemas.rb', line 34369

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

#to_json(options = nil) ⇒ Object



34376
34377
34378
# File 'lib/schemas.rb', line 34376

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