Class: AzureAuthLoginClass

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



379
380
381
382
383
384
# File 'lib/schemas.rb', line 379

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    identity_id: d.fetch("identityId"),
  )
end

.from_json!(json) ⇒ Object



386
387
388
# File 'lib/schemas.rb', line 386

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

Instance Method Details

#to_dynamicObject



390
391
392
393
394
# File 'lib/schemas.rb', line 390

def to_dynamic
  {
    "identityId" => identity_id,
  }
end

#to_json(options = nil) ⇒ Object



396
397
398
# File 'lib/schemas.rb', line 396

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