Class: PutScimV2UsersUserIDResponseName

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



34458
34459
34460
34461
34462
34463
34464
# File 'lib/schemas.rb', line 34458

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

.from_json!(json) ⇒ Object



34466
34467
34468
# File 'lib/schemas.rb', line 34466

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

Instance Method Details

#to_dynamicObject



34470
34471
34472
34473
34474
34475
# File 'lib/schemas.rb', line 34470

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

#to_json(options = nil) ⇒ Object



34477
34478
34479
# File 'lib/schemas.rb', line 34477

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