Class: GetTagsSlugEntitiesResponse401

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



16444
16445
16446
16447
16448
16449
16450
16451
16452
# File 'lib/schemas.rb', line 16444

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    detail:                                  d["detail"],
    status:                                  d["status"],
    title:                                   d["title"],
    get_tags_slug_entities_response401_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



16454
16455
16456
# File 'lib/schemas.rb', line 16454

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

Instance Method Details

#to_dynamicObject



16458
16459
16460
16461
16462
16463
16464
16465
# File 'lib/schemas.rb', line 16458

def to_dynamic
  {
    "detail" => detail,
    "status" => status,
    "title"  => title,
    "type"   => get_tags_slug_entities_response401_type,
  }
end

#to_json(options = nil) ⇒ Object



16467
16468
16469
# File 'lib/schemas.rb', line 16467

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