Class: GetTagsSlugEntitiesResponse500

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



16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
# File 'lib/schemas.rb', line 16581

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

.from_json!(json) ⇒ Object



16592
16593
16594
# File 'lib/schemas.rb', line 16592

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

Instance Method Details

#to_dynamicObject



16596
16597
16598
16599
16600
16601
16602
16603
16604
# File 'lib/schemas.rb', line 16596

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

#to_json(options = nil) ⇒ Object



16606
16607
16608
# File 'lib/schemas.rb', line 16606

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